about summary refs log tree commit diff
path: root/pkgs/development/compilers/chez
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2016-05-01 03:05:16 +0000
committerAustin Seipp <aseipp@pobox.com>2016-05-01 03:09:31 +0000
commitb3b02fe65691ac133515d80be109d1e26ddd6e12 (patch)
treebaaf72306424ebed649c3dab021476dd83765db5 /pkgs/development/compilers/chez
parentac3ce1c26a5b06a51b023eb99faa0dbc05f9327f (diff)
downloadnixlib-b3b02fe65691ac133515d80be109d1e26ddd6e12.tar
nixlib-b3b02fe65691ac133515d80be109d1e26ddd6e12.tar.gz
nixlib-b3b02fe65691ac133515d80be109d1e26ddd6e12.tar.bz2
nixlib-b3b02fe65691ac133515d80be109d1e26ddd6e12.tar.lz
nixlib-b3b02fe65691ac133515d80be109d1e26ddd6e12.tar.xz
nixlib-b3b02fe65691ac133515d80be109d1e26ddd6e12.tar.zst
nixlib-b3b02fe65691ac133515d80be109d1e26ddd6e12.zip
nixpkgs: chez scheme 9.4
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/development/compilers/chez')
-rw-r--r--pkgs/development/compilers/chez/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix
new file mode 100644
index 000000000000..f9e0627f8aa5
--- /dev/null
+++ b/pkgs/development/compilers/chez/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchgit, ncurses, libX11 }:
+
+stdenv.mkDerivation rec {
+  name    = "chez-scheme-${version}";
+  version = "9.4-${dver}";
+  dver    = "20160430";
+
+  src = fetchgit {
+    url    = "https://github.com/cisco/ChezScheme.git";
+    rev    = "63a97939896c2a89fcffdf16c8b783efaeb816b5";
+    sha256 = "1c58xjslgn7xnfy9j5p9b6sn0wzv2mk7zlmhflydzil7iimchjsi";
+    fetchSubmodules = true;
+  };
+
+  enableParallelBuilding = true;
+  buildInputs = [ ncurses libX11 ];
+
+  /* Chez uses a strange default search path, which completely
+  ** ignores the installation prefix for some reason, and instead
+  ** defaults to {/usr,/usr/local,$HOME}/lib for finding the .boot
+  ** file.
+  **
+  ** Also, we patch out a very annoying 'feature' in ./configure, too.
+  */
+  patchPhase = ''
+    substituteInPlace c/scheme.c \
+      --replace "/usr/lib/csv" "$out/lib/csv"
+
+    substituteInPlace ./configure \
+      --replace "git submodule init && git submodule update || exit 1" ""
+  '';
+
+  /* Don't use configureFlags, since that just implicitly appends
+  ** everything onto a --prefix flag, which ./configure gets very angry
+  ** about.
+  */
+  configurePhase = ''
+    ./configure --threads --installprefix=$out --installman=$out/share/man
+  '';
+
+  meta = {
+    description = "A powerful and incredibly fast R6RS Scheme compiler";
+    homepage    = "http://www.scheme.com";
+    license     = stdenv.lib.licenses.asl20;
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
+  };
+}