Wrap chicken so it can find gcc.

This commit is contained in:
Moritz Ulrich 2014-10-17 17:26:36 +02:00
parent 710765f9d9
commit f46e83da86

View File

@ -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 = {