1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
{ lib
, fetchurl
, stdenv
, bzip2
, gdbm
, gnum4
, gzip
, libffi
, openssl
, readline
, sqlite
, tcl
, xz
, zlib
}:
stdenv.mkDerivation rec {
pname = "snobol4";
version = "2.3.2";
src = fetchurl {
urls = [
"https://ftp.regressive.org/snobol4/snobol4-${version}.tar.gz"
# fallback for when the current version is moved to the old folder
"https://ftp.regressive.org/snobol4/old/snobol4-${version}.tar.gz"
];
hash = "sha256-QeMB6d0YDXARfWTzaU+d1U+e2QmjajJYfIvthatorBU=";
};
outputs = [ "out" "man" "doc" ];
# gzip used by Makefile to compress man pages
nativeBuildInputs = [ gnum4 gzip ];
# enable all features (undocumented, based on manual review of configure script)
buildInputs = [ bzip2 libffi openssl readline sqlite tcl xz zlib ]
# ndbm compat library
++ lib.optional stdenv.isLinux gdbm;
configureFlags = lib.optional (tcl != null) "--with-tcl=${tcl}/lib/tclConfig.sh";
# INSTALL says "parallel make will fail"
enableParallelBuilding = false;
patches = [ ./fix-paths.patch ];
# configure does not support --sbindir and the likes (as introduced by multiple-outputs.sh)
# so man, doc outputs must be handled manually
preConfigurePhases = [ "prePreConfigurePhase" ];
prePreConfigurePhase = ''
preConfigureHooks="''${preConfigureHooks//_multioutConfig/}"
prependToVar configureFlags --mandir="$man"/share/man
'';
meta = with lib; {
description = "Macro Implementation of SNOBOL4 in C";
longDescription = ''
An open source port of Macro SNOBOL4 (The original Bell Telephone Labs implementation, written in SIL macros) by Phil Budne.
Supports full SNOBOL4 language plus SPITBOL, [Blocks](https://www.regressive.org/snobol4/blocks/) and other extensions.
'';
homepage = "https://www.regressive.org/snobol4/csnobol4/";
license = licenses.bsd2;
platforms = platforms.all;
maintainers = with maintainers; [ xworld21 ];
};
}
|