1{
2 lib,
3 stdenv,
4 fetchurl,
5 scheme,
6 texinfo,
7 unzip,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "slib";
12 version = "3c1";
13
14 src = fetchurl {
15 url = "https://groups.csail.mit.edu/mac/ftpdir/scm/${pname}-${version}.zip";
16 hash = "sha256-wvjrmOYFMN9TIRmF1LQDtul6epaYM8Gm0b+DVh2gx4E=";
17 };
18
19 patches = [
20 ./catalog-in-library-vicinity.patch
21 ];
22
23 # slib:require unsupported feature color-database
24 postPatch = ''
25 substituteInPlace Makefile \
26 --replace " clrnamdb.scm" ""
27 '';
28
29 nativeBuildInputs = [
30 scheme
31 texinfo
32 unzip
33 ];
34 buildInputs = [ scheme ];
35
36 postInstall = ''
37 ln -s mklibcat{.scm,}
38 SCHEME_LIBRARY_PATH="$out/lib/slib" make catalogs
39
40 sed -i \
41 -e '2i export PATH="${scheme}/bin:$PATH"' \
42 -e '3i export GUILE_AUTO_COMPILE=0' \
43 $out/bin/slib
44 '';
45
46 # There's no test suite (?!).
47 doCheck = false;
48
49 setupHook = ./setup-hook.sh;
50
51 meta = {
52 description = "SLIB Portable Scheme Library";
53 mainProgram = "slib";
54
55 longDescription = ''
56 SLIB is a portable library for the programming language Scheme. It
57 provides a platform independent framework for using packages of Scheme
58 procedures and syntax. As distributed, SLIB contains useful packages
59 for all Scheme implementations. Its catalog can be transparently
60 extended to accommodate packages specific to a site, implementation,
61 user, or directory.
62
63 SLIB supports Bigloo, Chez, ELK 3.0, Gambit 4.0, Guile, JScheme, Kawa,
64 Larceny, MacScheme, MIT/GNU Scheme, Pocket Scheme, RScheme, scheme->C,
65 Scheme48, SCM, SCM Mac, scsh, sisc, Stk, T3.1, umb-scheme, and VSCM.
66 '';
67
68 # Public domain + permissive (non-copyleft) licensing of some files.
69 license = lib.licenses.publicDomain;
70
71 homepage = "https://people.csail.mit.edu/jaffer/SLIB";
72
73 maintainers = [ ];
74 platforms = lib.platforms.unix;
75 };
76}