diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-09-30 13:10:58 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-09-30 13:10:58 +0000 |
commit | 1a9597827d91cc7a0502e5a6994a68948d0536d9 (patch) | |
tree | 75dc58b2155fa9a2e97b48e61c70c41e9e0ca13b /pkgs/development/libraries/slib | |
parent | b62af15130e080ffed56454ee6e257a31ceb2a2c (diff) | |
download | nixlib-1a9597827d91cc7a0502e5a6994a68948d0536d9.tar nixlib-1a9597827d91cc7a0502e5a6994a68948d0536d9.tar.gz nixlib-1a9597827d91cc7a0502e5a6994a68948d0536d9.tar.bz2 nixlib-1a9597827d91cc7a0502e5a6994a68948d0536d9.tar.lz nixlib-1a9597827d91cc7a0502e5a6994a68948d0536d9.tar.xz nixlib-1a9597827d91cc7a0502e5a6994a68948d0536d9.tar.zst nixlib-1a9597827d91cc7a0502e5a6994a68948d0536d9.zip |
Add SLIB, a portable Scheme library.
svn path=/nixpkgs/trunk/; revision=17546
Diffstat (limited to 'pkgs/development/libraries/slib')
-rw-r--r-- | pkgs/development/libraries/slib/catalog-in-library-vicinity.patch | 29 | ||||
-rw-r--r-- | pkgs/development/libraries/slib/default.nix | 59 |
2 files changed, 88 insertions, 0 deletions
diff --git a/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch b/pkgs/development/libraries/slib/catalog-in-library-vicinity.patch new file mode 100644 index 000000000000..9b803a35fbdd --- /dev/null +++ b/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/pkgs/development/libraries/slib/default.nix b/pkgs/development/libraries/slib/default.nix new file mode 100644 index 000000000000..db85f5233526 --- /dev/null +++ b/pkgs/development/libraries/slib/default.nix @@ -0,0 +1,59 @@ +{ fetchurl, stdenv, unzip, scheme, texinfo }: + +stdenv.mkDerivation rec { + name = "slib-3b2"; + + src = fetchurl { + url = "http://groups.csail.mit.edu/mac/ftpdir/scm/${name}.zip"; + sha256 = "1s6a7f3ha2bhwj4nkg34n0j511ww1nlgrn5xis8k53l8ghdrrjxi"; + }; + + patches = [ ./catalog-in-library-vicinity.patch ]; + + buildInputs = [ unzip scheme texinfo ]; + + configurePhase = '' + ensureDir "$out" + sed -i "Makefile" \ + -e "s|^[[:blank:]]*prefix[[:blank:]]*=.*$|prefix = $out/|g" + ''; + + buildPhase = "make infoz"; + + installPhase = '' + make install + + 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; + + 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 accomodate 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 = "public domain"; + + homepage = http://people.csail.mit.edu/jaffer/SLIB; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + }; +} |