@@ -1,50 +1,12 @@
1−{ callPackage, fetchFromGitHub, gambit, bash }:
1+{ callPackage, fetchFromGitHub }:
22
33callPackage ./build.nix rec {
4− version = "0.15.1";
5− git-version = "0.15.1";
4+ version = "0.16";
5+ git-version = version;
66 src = fetchFromGitHub {
77 owner = "vyzo";
88 repo = "gerbil";
99 rev = "v${version}";
10− sha256 = "0qpqms66hz41wwhxb1z0fnzj96ivkm7qi9h9d7lhlr3fsxm1kp1n";
10+ sha256 = "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f";
1111 };
12− configurePhase = ''
13− grep -Fl '"gsc"' `find . -type f -name '*.s*'` | while read f ; do
14− substituteInPlace "$f" --replace '"gsc"' '"${gambit}/bin/gsc"' ;
15− done ;
16− for f in etc/gerbil.el src/std/make.ss ; do
17− substituteInPlace "$f" --replace '"gxc"' "\"$out/bin/gxc\"" ;
18− done ;
19−
20− # Enable all optional libraries
21− substituteInPlace "src/std/build-features.ss" --replace '#f' '#t' ;
22−
23− # Enable autodetection of a default GERBIL_HOME
24− for i in src/gerbil/boot/gx-init-exe.scm src/gerbil/boot/gx-init.scm ; do
25− substituteInPlace "$i" --replace '(define default-gerbil-home #f)' "(define default-gerbil-home \"$out/gerbil\")" ;
26− substituteInPlace "$i" --replace '(getenv "GERBIL_HOME" #f)' "(getenv \"GERBIL_HOME\" \"$out/gerbil\")" ;
27− done ;
28− for i in src/gerbil/boot/gxi-init.scm src/gerbil/compiler/driver.ss src/gerbil/runtime/gx-gambc.scm src/std/build.ss src/tools/build.ss ; do
29− substituteInPlace "$i" --replace '(getenv "GERBIL_HOME")' "(getenv \"GERBIL_HOME\" \"$out/gerbil\")" ;
30− done
31− '';
32− installPhase = ''
33− runHook preInstall
34− mkdir -p $out/gerbil $out/bin
35− cp -fa bin lib etc doc $out/gerbil
36− cat > $out/gerbil/bin/gxi <<EOF
37−#!${bash}/bin/bash -e
38−GERBIL_GSI=${gambit}/bin/gsi
39−export GERBIL_HOME=$out/gerbil
40−case "\$1" in -:*) GSIOPTIONS="\$1" ; shift ;; esac
41−if [[ \$# = 0 ]] ; then
42− exec "\$GERBIL_GSI" \$GSIOPTIONS "\$GERBIL_HOME/lib/gxi-init" "\$GERBIL_HOME/lib/gxi-interactive" -
43−else
44− exec "\$GERBIL_GSI" \$GSIOPTIONS "\$GERBIL_HOME/lib/gxi-init" "\$@"
45−fi
46−EOF
47− (cd $out/bin ; ln -s ../gerbil/bin/* .)
48− runHook postInstall
49− '';
5012}