Added debug option alwaysFail to builderDefs; fixed a long-time bug in the process..
svn path=/nixpkgs/trunk/; revision=11838
This commit is contained in:
parent
374ccd290b
commit
732e12095e
@ -396,8 +396,16 @@ args: with args; with stringsWithDeps; with lib;
|
|||||||
GHC_PACKAGE_PATH=\$PACKAGE_DB ./register.sh
|
GHC_PACKAGE_PATH=\$PACKAGE_DB ./register.sh
|
||||||
" ["defCreateEmptyPackageDatabaseAndSetupHook" "defCabalSetupCmd"];
|
" ["defCreateEmptyPackageDatabaseAndSetupHook" "defCabalSetupCmd"];
|
||||||
|
|
||||||
phaseNames = args.phaseNames ++
|
realPhaseNames = args.phaseNames ++
|
||||||
["doForceShare" "doPropagate"];
|
["doForceShare" "doPropagate"]
|
||||||
|
++
|
||||||
|
(optional (getAttr ["alwaysFail"] false args) "doFail")
|
||||||
|
;
|
||||||
|
|
||||||
|
doFail = noDepEntry "
|
||||||
|
echo 'Failing to keep builddir (and to invalidate result).'
|
||||||
|
a() { return 127; } ; a ;
|
||||||
|
";
|
||||||
|
|
||||||
extraDerivationAttrs = lib.getAttr ["extraDerivationAttrs"] {} args;
|
extraDerivationAttrs = lib.getAttr ["extraDerivationAttrs"] {} args;
|
||||||
|
|
||||||
@ -407,7 +415,7 @@ args: with args; with stringsWithDeps; with lib;
|
|||||||
stdenv.mkDerivation ((rec {
|
stdenv.mkDerivation ((rec {
|
||||||
inherit (localDefs) name;
|
inherit (localDefs) name;
|
||||||
builder = writeScript (name + "-builder")
|
builder = writeScript (name + "-builder")
|
||||||
(textClosure localDefs localDefs.phaseNames);
|
(textClosure localDefs localDefs.realPhaseNames);
|
||||||
meta = localDefs.meta // {inherit src;};
|
meta = localDefs.meta // {inherit src;};
|
||||||
}) // (if localDefs ? propagatedBuildInputs then {
|
}) // (if localDefs ? propagatedBuildInputs then {
|
||||||
inherit (localDefs) propagatedBuildInputs;
|
inherit (localDefs) propagatedBuildInputs;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user