about summary refs log tree commit diff
path: root/pkgs/development/compilers/chicken
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2014-10-17 17:26:36 +0200
committerMoritz Ulrich <moritz@tarn-vedra.de>2014-10-17 17:26:36 +0200
commitf46e83da8642d5a800e064ecdf486d38830735b6 (patch)
tree5b9a74f60f79bb46c7928b2f1e11b53ea19f76a8 /pkgs/development/compilers/chicken
parent710765f9d94442c49dfb43f496f89139064972f7 (diff)
downloadnixlib-f46e83da8642d5a800e064ecdf486d38830735b6.tar
nixlib-f46e83da8642d5a800e064ecdf486d38830735b6.tar.gz
nixlib-f46e83da8642d5a800e064ecdf486d38830735b6.tar.bz2
nixlib-f46e83da8642d5a800e064ecdf486d38830735b6.tar.lz
nixlib-f46e83da8642d5a800e064ecdf486d38830735b6.tar.xz
nixlib-f46e83da8642d5a800e064ecdf486d38830735b6.tar.zst
nixlib-f46e83da8642d5a800e064ecdf486d38830735b6.zip
Wrap chicken so it can find gcc.
Diffstat (limited to 'pkgs/development/compilers/chicken')
-rw-r--r--pkgs/development/compilers/chicken/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/development/compilers/chicken/default.nix b/pkgs/development/compilers/chicken/default.nix
index cac55efd5208..0e210343a72f 100644
--- a/pkgs/development/compilers/chicken/default.nix
+++ b/pkgs/development/compilers/chicken/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, bootstrap-chicken ? null }:
+{ stdenv, fetchurl, makeWrapper, bootstrap-chicken ? null }:
 
 let
   version = "4.9.0.1";
@@ -31,9 +31,11 @@ stdenv.mkDerivation {
     ./0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch
   ];
 
-  buildInputs = lib.ifEnable (bootstrap-chicken != null) [
+  buildInputs = [
+    makeWrapper
+  ] ++ (lib.ifEnable (bootstrap-chicken != null) [
     bootstrap-chicken
-  ];
+  ]);
 
   preBuild = lib.ifEnable (bootstrap-chicken != null) ''
     # Backup the build* files - those are generated from hostname,
@@ -47,6 +49,14 @@ stdenv.mkDerivation {
     mv build-backup/* .
   '';
 
+  postInstall = ''
+    for f in $out/bin/*
+    do
+      wrapProgram $f \
+        --prefix PATH : ${stdenv.gcc}/bin
+    done
+  '';
+
   # TODO: Assert csi -R files -p '(pathname-file (repository-path))' == binaryVersion
 
   meta = {