2023-08-10 07:59:29 +00:00
|
|
|
{ lib, stdenv, fetchurl, scheme, texinfo, unzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "slib";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3c1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://groups.csail.mit.edu/mac/ftpdir/scm/${pname}-${version}.zip";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-wvjrmOYFMN9TIRmF1LQDtul6epaYM8Gm0b+DVh2gx4E=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
patches = [
|
|
|
|
./catalog-in-library-vicinity.patch
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
# slib:require unsupported feature color-database
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace " clrnamdb.scm" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ scheme texinfo unzip ];
|
|
|
|
buildInputs = [ scheme ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
ln -s mklibcat{.scm,}
|
|
|
|
SCHEME_LIBRARY_PATH="$out/lib/slib" make catalogs
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
sed -i \
|
|
|
|
-e '2i export PATH="${scheme}/bin:$PATH"' \
|
|
|
|
-e '3i export GUILE_AUTO_COMPILE=0' \
|
|
|
|
$out/bin/slib
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# There's no test suite (?!).
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The SLIB Portable Scheme Library";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "slib";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
SLIB is a portable library for the programming language Scheme. It
|
|
|
|
provides a platform independent framework for using packages of Scheme
|
|
|
|
procedures and syntax. As distributed, SLIB contains useful packages
|
|
|
|
for all Scheme implementations. Its catalog can be transparently
|
|
|
|
extended to accommodate packages specific to a site, implementation,
|
|
|
|
user, or directory.
|
|
|
|
|
|
|
|
SLIB supports Bigloo, Chez, ELK 3.0, Gambit 4.0, Guile, JScheme, Kawa,
|
|
|
|
Larceny, MacScheme, MIT/GNU Scheme, Pocket Scheme, RScheme, scheme->C,
|
|
|
|
Scheme48, SCM, SCM Mac, scsh, sisc, Stk, T3.1, umb-scheme, and VSCM.
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Public domain + permissive (non-copyleft) licensing of some files.
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.publicDomain;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
homepage = "http://people.csail.mit.edu/jaffer/SLIB";
|
|
|
|
|
|
|
|
maintainers = [ ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|