gerbilPackages-unstable.smug-gerbil: init at 2019-12-24

This commit is contained in:
Francois-Rene Rideau
2020-11-06 12:03:58 -05:00
parent 078d667f9e
commit 8ff03048f9
2 changed files with 36 additions and 4 deletions
@@ -1,4 +1,4 @@
{ pkgs, gccStdenv, callPackage, fetchFromGitHub }:
{ pkgs, lib, gccStdenv, callPackage, fetchFromGitHub }:
# See ../gambit/build.nix regarding gccStdenv
rec {
@@ -9,6 +9,7 @@ rec {
gerbil-poo = callPackage ./gerbil-poo.nix { };
gerbil-persist = callPackage ./gerbil-persist.nix { };
gerbil-ethereum = callPackage ./gerbil-ethereum.nix { };
smug-gerbil = callPackage ./smug-gerbil.nix { };
};
# Use this function in any package that uses Gerbil libraries, to define the GERBIL_LOADPATH.
@@ -23,6 +24,7 @@ rec {
gambit-params ? pkgs.gambit-support.stable-params,
gerbilInputs ? [],
buildInputs ? [],
buildScript ? "./build.ss",
softwareName ? ""} :
let buildInputs_ = buildInputs; in
gccStdenv.mkDerivation rec {
@@ -33,8 +35,8 @@ rec {
set -e ;
if [ -n "${version-path}.ss" ] ; then
echo -e '(import :clan/versioning${builtins.concatStringsSep ""
(map (x : if x.passthru.version-path != ""
then " :${x.passthru.gerbil-package}/${x.passthru.version-path}" else "")
(map (x : lib.optionalString (x.passthru.version-path != "")
" :${x.passthru.gerbil-package}/${x.passthru.version-path}")
gerbilInputs)
})\n(register-software "${softwareName}" "v${git-version}")\n' > "${passthru.version-path}.ss"
fi
@@ -50,7 +52,7 @@ rec {
buildPhase = ''
runHook preBuild
./build.ss
${buildScript}
runHook postBuild
'';