about summary refs log tree commit diff
path: root/pkgs/development/compilers/gerbil/gerbil-support.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/gerbil/gerbil-support.nix')
-rw-r--r--pkgs/development/compilers/gerbil/gerbil-support.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/development/compilers/gerbil/gerbil-support.nix b/pkgs/development/compilers/gerbil/gerbil-support.nix
index e3f4bb0e0d254..37f5c00efdb40 100644
--- a/pkgs/development/compilers/gerbil/gerbil-support.nix
+++ b/pkgs/development/compilers/gerbil/gerbil-support.nix
@@ -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
       '';