about summary refs log tree commit diff
path: root/pkgs/development/compilers/mit-scheme
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-01-22 23:23:53 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-01-22 23:23:53 +0100
commit0a47a28f1df3bdf7b2cf074af84a432aa48cbba7 (patch)
tree6c953c0d58cf6d178795383fefe9babddaa7da4e /pkgs/development/compilers/mit-scheme
parent3e2e62ca31311dd7e5237aa97a815458a44a3a3e (diff)
parent296cd6600943d5a349cda55a36137331f8c3eec8 (diff)
Merge remote-tracking branch 'origin/master' into stdenv-updates
Diffstat (limited to 'pkgs/development/compilers/mit-scheme')
-rw-r--r--pkgs/development/compilers/mit-scheme/default.nix22
1 files changed, 18 insertions, 4 deletions
diff --git a/pkgs/development/compilers/mit-scheme/default.nix b/pkgs/development/compilers/mit-scheme/default.nix
index d7f7282b4b8cf..29950aa9e3dde 100644
--- a/pkgs/development/compilers/mit-scheme/default.nix
+++ b/pkgs/development/compilers/mit-scheme/default.nix
@@ -1,8 +1,12 @@
-{ fetchurl, stdenv, gnum4, texinfo, texLive, automake }:
+{ fetchurl, stdenv, makeWrapper, gnum4, texinfo, texLive, automake }:
 
 let
   version = "9.1.1";
   bootstrapFromC = ! (stdenv.isi686 || stdenv.isx86_64);
+
+  arch = if      stdenv.isi686   then "-i386"
+         else if stdenv.isx86_64 then "-x86-64"
+         else                         "";
 in
 stdenv.mkDerivation {
   name = "mit-scheme-${version}";
@@ -25,6 +29,11 @@ stdenv.mkDerivation {
       sha256 = "0pclakzwxbqgy6wqwvs6ml62wgby8ba8xzmwzdwhx1v8wv05yw1j";
     };
 
+  configurePhase =
+    '' (cd src && ./configure)
+       (cd doc && ./configure)
+    '';
+
   buildPhase =
     '' cd src
        ${if bootstrapFromC
@@ -42,11 +51,16 @@ stdenv.mkDerivation {
     '';
 
   installPhase =
-    '' make install -C src
-       make install -C doc
+    '' make prefix=$out install -C src
+       make prefix=$out install -C doc
+    '';
+
+  fixupPhase =
+    '' wrapProgram $out/bin/mit-scheme${arch} --set MITSCHEME_LIBRARY_PATH \
+         $out/lib/mit-scheme${arch}
     '';
 
-  nativeBuildInputs = [ gnum4 texinfo texLive automake ];
+  nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ];
 
   # XXX: The `check' target doesn't exist.
   doCheck = false;