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.
This commit is contained in:
parent
f9360e7974
commit
0d0f475f27
@ -1,9 +1,8 @@
|
||||
{ pkgs, gccStdenv, lib, coreutils, # makeStaticLibraries,
|
||||
{ pkgs, gccStdenv, lib, coreutils, bash, # makeStaticLibraries,
|
||||
openssl, zlib, sqlite, libxml2, libyaml, libmysqlclient, lmdb, leveldb, postgresql,
|
||||
version, git-version,
|
||||
gambit-support,
|
||||
gambit ? pkgs.gambit, gambit-params ? pkgs.gambit-support.stable-params,
|
||||
src, configurePhase, installPhase }:
|
||||
gambit ? pkgs.gambit, gambit-params ? pkgs.gambit-support.stable-params, src }:
|
||||
|
||||
# We use Gambit, that works 10x better with GCC than Clang. See ../gambit/build.nix
|
||||
let stdenv = gccStdenv; in
|
||||
@ -48,7 +47,18 @@ stdenv.mkDerivation rec {
|
||||
# LEVELDB=${makeStaticLibraries leveldb}/lib/libleveldb.a
|
||||
# EOF
|
||||
|
||||
inherit configurePhase installPhase;
|
||||
configurePhase = ''
|
||||
(cd src && ./configure \
|
||||
--prefix=$out/gerbil \
|
||||
--with-gambit=${gambit}/gambit \
|
||||
--enable-libxml \
|
||||
--enable-libyaml \
|
||||
--enable-zlib \
|
||||
--enable-sqlite \
|
||||
--enable-mysql \
|
||||
--enable-lmdb \
|
||||
--enable-leveldb)
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
@ -69,6 +79,14 @@ stdenv.mkDerivation rec {
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/gerbil $out/bin
|
||||
(cd src; ./install)
|
||||
(cd $out/bin ; ln -s ../gerbil/bin/* .)
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
|
@ -1,50 +1,12 @@
|
||||
{ callPackage, fetchFromGitHub, gambit, bash }:
|
||||
{ callPackage, fetchFromGitHub }:
|
||||
|
||||
callPackage ./build.nix rec {
|
||||
version = "0.15.1";
|
||||
git-version = "0.15.1";
|
||||
version = "0.16";
|
||||
git-version = version;
|
||||
src = fetchFromGitHub {
|
||||
owner = "vyzo";
|
||||
repo = "gerbil";
|
||||
rev = "v${version}";
|
||||
sha256 = "0qpqms66hz41wwhxb1z0fnzj96ivkm7qi9h9d7lhlr3fsxm1kp1n";
|
||||
sha256 = "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f";
|
||||
};
|
||||
configurePhase = ''
|
||||
grep -Fl '"gsc"' `find . -type f -name '*.s*'` | while read f ; do
|
||||
substituteInPlace "$f" --replace '"gsc"' '"${gambit}/bin/gsc"' ;
|
||||
done ;
|
||||
for f in etc/gerbil.el src/std/make.ss ; do
|
||||
substituteInPlace "$f" --replace '"gxc"' "\"$out/bin/gxc\"" ;
|
||||
done ;
|
||||
|
||||
# Enable all optional libraries
|
||||
substituteInPlace "src/std/build-features.ss" --replace '#f' '#t' ;
|
||||
|
||||
# Enable autodetection of a default GERBIL_HOME
|
||||
for i in src/gerbil/boot/gx-init-exe.scm src/gerbil/boot/gx-init.scm ; do
|
||||
substituteInPlace "$i" --replace '(define default-gerbil-home #f)' "(define default-gerbil-home \"$out/gerbil\")" ;
|
||||
substituteInPlace "$i" --replace '(getenv "GERBIL_HOME" #f)' "(getenv \"GERBIL_HOME\" \"$out/gerbil\")" ;
|
||||
done ;
|
||||
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
|
||||
substituteInPlace "$i" --replace '(getenv "GERBIL_HOME")' "(getenv \"GERBIL_HOME\" \"$out/gerbil\")" ;
|
||||
done
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/gerbil $out/bin
|
||||
cp -fa bin lib etc doc $out/gerbil
|
||||
cat > $out/gerbil/bin/gxi <<EOF
|
||||
#!${bash}/bin/bash -e
|
||||
GERBIL_GSI=${gambit}/bin/gsi
|
||||
export GERBIL_HOME=$out/gerbil
|
||||
case "\$1" in -:*) GSIOPTIONS="\$1" ; shift ;; esac
|
||||
if [[ \$# = 0 ]] ; then
|
||||
exec "\$GERBIL_GSI" \$GSIOPTIONS "\$GERBIL_HOME/lib/gxi-init" "\$GERBIL_HOME/lib/gxi-interactive" -
|
||||
else
|
||||
exec "\$GERBIL_GSI" \$GSIOPTIONS "\$GERBIL_HOME/lib/gxi-init" "\$@"
|
||||
fi
|
||||
EOF
|
||||
(cd $out/bin ; ln -s ../gerbil/bin/* .)
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support, coreutils, bash }:
|
||||
{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support }:
|
||||
|
||||
callPackage ./build.nix rec {
|
||||
version = "unstable-2020-05-17";
|
||||
@ -12,23 +12,4 @@ callPackage ./build.nix rec {
|
||||
inherit gambit-support;
|
||||
gambit = gambit-unstable;
|
||||
gambit-params = gambit-support.unstable-params;
|
||||
configurePhase = ''
|
||||
(cd src && ./configure \
|
||||
--prefix=$out/gerbil \
|
||||
--with-gambit=${gambit}/gambit \
|
||||
--enable-libxml \
|
||||
--enable-libyaml \
|
||||
--enable-zlib \
|
||||
--enable-sqlite \
|
||||
--enable-mysql \
|
||||
--enable-lmdb \
|
||||
--enable-leveldb)
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/gerbil $out/bin
|
||||
(cd src; ./install)
|
||||
(cd $out/bin ; ln -s ../gerbil/bin/* .)
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user