@@ 35,7 35,6 @@ in rec {
eggCache ? src,
buildInputs ? [],
shellHook ? "",
- preUnpack ? "",
...
} @ args:
let
@@ 48,13 47,14 @@ in rec {
export CHICKEN_REPOSITORY_PATH=$TMPDIR/build/${repositoryPath}:$CHICKEN_REPOSITORY_PATH
export CHICKEN_INCLUDE_PATH=$TMPDIR/build/share:$CHICKEN_INCLUDE_PATH
'';
- offlineDefaults = writeText "setup.defaults" ''
+ offlineChickenInstall = writeShellScriptBin "chicken-install" ''
+ test -d $TMPDIR/eggs || cp -R -L ${eggCache} $TMPDIR/eggs
+ test -f $TMPDIR/setup.defaults || cat > $TMPDIR/setup.defaults <<EOF
(version 2)
- (location "../.eggs")
+ (location "$TMPDIR/eggs")
(map (srfi-4 ->))
- '';
- offlineChickenInstall = writeShellScriptBin "chicken-install" ''
- exec ${chicken}/bin/chicken-install -defaults ${offlineDefaults} "$@"
+ EOF
+ exec ${chicken}/bin/chicken-install -defaults $TMPDIR/setup.defaults "$@"
'';
in stdenv.mkDerivation (args // {
inherit name setupEnvironmentPhase;
@@ 75,10 75,6 @@ in rec {
source $TMPDIR/.env
'';
- preUnpack = preUnpack + ''
- cp -R -L ${eggCache} .eggs
- '';
-
buildPhase = ''
runHook preBuild