[Nix-dev] env-vars for builderDefs ?
Michael Raskin
7c6f434c at mail.ru
Sat Aug 22 09:51:20 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marc Weber wrote:
> @@ -408,6 +408,9 @@
> (attrByPath ["extraDoc"] [] args)))) ["minInit" "defEnsureDir" "doUnpack"];
>
> realPhaseNames =
> + # write env-vars file which is useful for debugging builds
> + [ (noDepEntry ''trap 'eval $TRAP' EXIT; TRAP='export > "$NIX_BUILD_TOP/env-vars"' EXIT'') ]
> + ++
> (optional ([] != attrByPath ["neededDirs"] [] args) "createDirs")
> ++
> args.phaseName
It is a dirty way to do the work.
setEnvVarTrap = (noDepEntry ''trap 'eval "$TRAP"' EXIT;
TRAP="$TRAP;"'export > "$NIX_BUILD_TOP/env-vars"' EXIT'');
..
realPhaseNames = ["setEnvVarTrap"] ++ ..
Changes are motivated by the following:
Every underquoting should have a reason to exist. Every stage should be
defined on its own before use.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJKj6N3AAoJEE6tnN0aWvw3G/MH/jQIMDeqXquomulVmbusDEME
XfUzTik1rTh9balckDVQgR2EgwUQ/jeLXZIeGrNr6IzoH9KbJLsJBvZRcYoxOZiC
miD/V519XLLFeStLj9dbMYkvODWbnXUta0wQGKB88nLbvav2BLMZu4Mu+8w6n8Sh
eT7uq/CvY0D5GhyFJDp2pqol3LNgWhap/xQX9mNG9oQm6qTc+ShRz+teHA7Z5zcG
RN1J5XE3fj1gPe7vswVJlsiF/O1+KmR6XaRYN/Ju5OPPTpzIrzIFYXd2ofmpq2/e
GebprFJafwpJtuI/mxM7fnzDQ+ja6WvfBebaD5NtG9FCAGFHdzazyvVD8tMB2eE=
=rXo+
-----END PGP SIGNATURE-----
More information about the nix-dev
mailing list