about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/slib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/slib
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/slib')
-rw-r--r--nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch29
-rw-r--r--nixpkgs/pkgs/development/libraries/slib/default.nix52
-rw-r--r--nixpkgs/pkgs/development/libraries/slib/setup-hook.sh13
3 files changed, 94 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch b/nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch
new file mode 100644
index 000000000000..9b803a35fbdd
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch
@@ -0,0 +1,29 @@
+Write the catalog in under `(library-vicinity)', which is a subdir of $out,
+rather than under `(implementation-vicinity)', which is a subdir of ${scheme}.
+
+The downside is that we can't build an SLIB for several Schemes at the
+same time.
+
+--- slib/mklibcat.scm	2007-12-24 05:47:34.000000000 +0100
++++ slib/mklibcat.scm	2009-09-29 14:08:28.000000000 +0200
+@@ -17,7 +17,7 @@
+ ;promotional, or sales literature without prior written consent in
+ ;each case.
+ 
+-(let ((catpath (in-vicinity (implementation-vicinity) "slibcat")))
++(let ((catpath (in-vicinity (library-vicinity) "slibcat")))
+   (and (file-exists? catpath) (delete-file catpath))
+   (call-with-output-file catpath
+     (lambda (op)
+
+--- slib/require.scm	2009-08-03 04:09:47.000000000 +0200
++++ slib/require.scm	2009-09-29 14:13:56.000000000 +0200
+@@ -74,7 +74,7 @@
+ 
+ (define (catalog:get feature)
+   (if (not *catalog*)
+-      (let ((slibcat (catalog:try-read (implementation-vicinity) "slibcat")))
++      (let ((slibcat (catalog:try-read (library-vicinity) "slibcat")))
+ 	(cond ((not (catalog/require-version-match? slibcat))
+ 	       (slib:load-source (in-vicinity (library-vicinity) "mklibcat"))
+ 	       (set! slibcat
diff --git a/nixpkgs/pkgs/development/libraries/slib/default.nix b/nixpkgs/pkgs/development/libraries/slib/default.nix
new file mode 100644
index 000000000000..665f025ffcf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/slib/default.nix
@@ -0,0 +1,52 @@
+{ fetchurl, stdenv, unzip, scheme, texinfo }:
+
+stdenv.mkDerivation rec {
+  name = "slib-3b5";
+
+  src = fetchurl {
+    url = "https://groups.csail.mit.edu/mac/ftpdir/scm/${name}.zip";
+    sha256 = "0q0p2d53p8qw2592yknzgy2y1p5a9k7ppjx0cfrbvk6242c4mdpq";
+  };
+
+  patches = [ ./catalog-in-library-vicinity.patch ];
+
+  buildInputs = [ unzip scheme texinfo ];
+
+  postInstall = ''
+    ln -s mklibcat{.scm,}
+    SCHEME_LIBRARY_PATH="$out/lib/slib" make catalogs
+
+    sed -i "$out/bin/slib" \
+        -e "/^SCHEME_LIBRARY_PATH/i export PATH=\"${scheme}/bin:\$PATH\""
+  '';
+
+  # There's no test suite (?!).
+  doCheck = false;
+
+  setupHook = ./setup-hook.sh;
+
+  meta = {
+    description = "The SLIB Portable Scheme Library";
+
+    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.
+    license = stdenv.lib.licenses.publicDomain;
+
+    homepage = http://people.csail.mit.edu/jaffer/SLIB;
+
+    maintainers = [ ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/libraries/slib/setup-hook.sh b/nixpkgs/pkgs/development/libraries/slib/setup-hook.sh
new file mode 100644
index 000000000000..3c7e91e81886
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/slib/setup-hook.sh
@@ -0,0 +1,13 @@
+addSlibPath () {
+    if test -f "$1/lib/slib/slibcat"
+    then
+	export SCHEME_LIBRARY_PATH="$1/lib/slib/"
+	echo "SLIB found in \`$1'; setting \$SCHEME_LIBRARY_PATH to \`$SCHEME_LIBRARY_PATH'"
+
+	# This is needed so that `(load-from-path "slib/guile.init")' works.
+	export GUILE_LOAD_PATH="$1/lib:$GUILE_LOAD_PATH"
+	echo "SLIB: setting \$GUILE_LOAD_PATH to \`$GUILE_LOAD_PATH'"
+    fi
+}
+
+addEnvHooks "$hostOffset" addSlibPath