chicken: Implement support for bootstrap-builds
This is necessary in order to apply custom patches, as chicken needs a bootstrap build to regenerate *.c files. This is also necessary when building from git.
This commit is contained in:
parent
e17781f8b1
commit
a4834a3e84
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl }:
|
{ stdenv, fetchurl, bootstrap-chicken ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "4.9.0.1";
|
version = "4.9.0.1";
|
||||||
|
@ -20,6 +20,28 @@ stdenv.mkDerivation {
|
||||||
buildFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
buildFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
||||||
installFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
installFlags = "PLATFORM=${platform} PREFIX=$(out) VARDIR=$(out)/var/lib";
|
||||||
|
|
||||||
|
# We need a bootstrap-chicken to regenerate the c-files after
|
||||||
|
# applying a patch to add support for CHICKEN_REPOSITORY_EXTRA
|
||||||
|
patches = stdenv.lib.ifEnable (bootstrap-chicken != null) [
|
||||||
|
./0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = stdenv.lib.ifEnable (bootstrap-chicken != null) [
|
||||||
|
bootstrap-chicken
|
||||||
|
];
|
||||||
|
|
||||||
|
preBuild = stdenv.lib.ifEnable (bootstrap-chicken != null) ''
|
||||||
|
# Backup the build* files - those are generated from hostname,
|
||||||
|
# git-tag, etc. and we don't need/want that
|
||||||
|
mkdir -p build-backup
|
||||||
|
mv buildid buildbranch buildtag.h build-backup
|
||||||
|
|
||||||
|
# Regenerate eval.c after the patch
|
||||||
|
make spotless $buildFlags
|
||||||
|
|
||||||
|
mv build-backup/* .
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = http://www.call-cc.org/;
|
homepage = http://www.call-cc.org/;
|
||||||
license = "BSD";
|
license = "BSD";
|
||||||
|
|
|
@ -2791,7 +2791,9 @@ let
|
||||||
|
|
||||||
bigloo = callPackage ../development/compilers/bigloo { };
|
bigloo = callPackage ../development/compilers/bigloo { };
|
||||||
|
|
||||||
chicken = callPackage ../development/compilers/chicken { };
|
chicken = callPackage ../development/compilers/chicken {
|
||||||
|
bootstrap-chicken = chicken.override { bootstrap-chicken = null; };
|
||||||
|
};
|
||||||
|
|
||||||
ccl = builderDefsPackage ../development/compilers/ccl {};
|
ccl = builderDefsPackage ../development/compilers/ccl {};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue