git.iko.soy/typeable/nixpkgs
on master help sign in
gerbil: 0.15.1 -> 0.16

Now that v0.16 was released at last, make the configurePhase and instalPhase the same again for default and unstable.

commit0d0f475f27b0978490a44327bdd558947d62c1e9 authorFrancois-Rene Rideau <fare@tunes.org> dateSun 17 May 2020, 16:10 (7 years ago) parentf9360e7
3 files changed+27−66
pkgs/development/compilers/gerbil/build.nix+22−4 pkgs/development/compilers/gerbil/default.nix+4−42 pkgs/development/compilers/gerbil/unstable.nix+1−20
pkgs/development/compilers/gerbil/build.nix+22−4
@@ -1,9 +1,8 @@
1−{ pkgs, gccStdenv, lib, coreutils, # makeStaticLibraries,
1+{ pkgs, gccStdenv, lib, coreutils, bash, # makeStaticLibraries,
22 openssl, zlib, sqlite, libxml2, libyaml, libmysqlclient, lmdb, leveldb, postgresql,
33 version, git-version,
44 gambit-support,
5− gambit ? pkgs.gambit, gambit-params ? pkgs.gambit-support.stable-params,
6− src, configurePhase, installPhase }:
5+ gambit ? pkgs.gambit, gambit-params ? pkgs.gambit-support.stable-params, src }:
76
87# We use Gambit, that works 10x better with GCC than Clang. See ../gambit/build.nix
98let stdenv = gccStdenv; in
@@ -48,7 +47,18 @@ stdenv.mkDerivation rec {
4847# LEVELDB=${makeStaticLibraries leveldb}/lib/libleveldb.a
4948# EOF
5049
51− inherit configurePhase installPhase;
50+ configurePhase = ''
51+ (cd src && ./configure \
52+ --prefix=$out/gerbil \
53+ --with-gambit=${gambit}/gambit \
54+ --enable-libxml \
55+ --enable-libyaml \
56+ --enable-zlib \
57+ --enable-sqlite \
58+ --enable-mysql \
59+ --enable-lmdb \
60+ --enable-leveldb)
61+ '';
5262
5363 buildPhase = ''
5464 runHook preBuild
@@ -69,6 +79,14 @@ stdenv.mkDerivation rec {
6979 runHook postBuild
7080 '';
7181
82+ installPhase = ''
83+ runHook preInstall
84+ mkdir -p $out/gerbil $out/bin
85+ (cd src; ./install)
86+ (cd $out/bin ; ln -s ../gerbil/bin/* .)
87+ runHook postInstall
88+ '';
89+
7290 dontStrip = true;
7391
7492 meta = {
pkgs/development/compilers/gerbil/default.nix+4−42
@@ -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}
pkgs/development/compilers/gerbil/unstable.nix+1−20
@@ -1,4 +1,4 @@
1−{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support, coreutils, bash }:
1+{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support }:
22
33callPackage ./build.nix rec {
44 version = "unstable-2020-05-17";
@@ -12,23 +12,4 @@ callPackage ./build.nix rec {
1212 inherit gambit-support;
1313 gambit = gambit-unstable;
1414 gambit-params = gambit-support.unstable-params;
15− configurePhase = ''
16− (cd src && ./configure \
17− --prefix=$out/gerbil \
18− --with-gambit=${gambit}/gambit \
19− --enable-libxml \
20− --enable-libyaml \
21− --enable-zlib \
22− --enable-sqlite \
23− --enable-mysql \
24− --enable-lmdb \
25− --enable-leveldb)
26− '';
27− installPhase = ''
28− runHook preInstall
29− mkdir -p $out/gerbil $out/bin
30− (cd src; ./install)
31− (cd $out/bin ; ln -s ../gerbil/bin/* .)
32− runHook postInstall
33− '';
3415}