about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/compilers/chicken/eggDerivation.nix10
-rw-r--r--pkgs/development/compilers/chicken/patches.nix10
2 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/development/compilers/chicken/eggDerivation.nix b/pkgs/development/compilers/chicken/eggDerivation.nix
index f9a3da83eaba..9a7c56da11a0 100644
--- a/pkgs/development/compilers/chicken/eggDerivation.nix
+++ b/pkgs/development/compilers/chicken/eggDerivation.nix
@@ -7,6 +7,14 @@
 
 let
   libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
+  patches = import ./patches.nix;
+  lib = stdenv.lib;
+  baseName = (builtins.parseDrvName name).name;
+  patch = if builtins.hasAttr baseName patches
+   then
+     builtins.getAttr baseName patches
+   else
+     {};
 in
 stdenv.mkDerivation ({
   name = "chicken-${name}";
@@ -37,4 +45,4 @@ stdenv.mkDerivation ({
         --prefix PATH : "$out/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
     done
   '';
-} // (builtins.removeAttrs args ["name" "buildInputs"]))
+} // (builtins.removeAttrs args ["name" "buildInputs"]) // patch)
diff --git a/pkgs/development/compilers/chicken/patches.nix b/pkgs/development/compilers/chicken/patches.nix
new file mode 100644
index 000000000000..9fdda9b6d9fe
--- /dev/null
+++ b/pkgs/development/compilers/chicken/patches.nix
@@ -0,0 +1,10 @@
+{
+  setup-helper = {
+    preBuild = ''
+      substituteInPlace setup-helper.setup \
+        --replace "(chicken-home)" \"$out/share/\"
+
+        cat setup-helper.setup
+    '';
+  };
+}