aboutsummaryrefslogtreecommitdiff
path: root/release.nix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-03-02 15:25:04 +0100
committerLudovic Courtès <ludo@gnu.org>2013-03-02 15:25:04 +0100
commitc86929e403559a6f9bc4cd76bbdd9fe9edd9686f (patch)
treeac22b9e2bf8f8abb0d151057c4efd25bb5e76127 /release.nix
parent11a7ceb9e804c63a22e4bc0ce2a3c302d7ecb18e (diff)
downloadguix-c86929e403559a6f9bc4cd76bbdd9fe9edd9686f.tar
guix-c86929e403559a6f9bc4cd76bbdd9fe9edd9686f.tar.gz
release.nix: Unchroot recursively.
* release.nix (unchroot): Operate recursively on build inputs.
Diffstat (limited to 'release.nix')
-rw-r--r--release.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/release.nix b/release.nix
index aed99717df..91eb372c60 100644
--- a/release.nix
+++ b/release.nix
@@ -30,10 +30,23 @@ let
# hydra.gnu.org where we want Guix derivations to run in a chroot that lacks
# /bin, whereas Nixpkgs relies on /bin/sh.
unchroot =
- let pkgs = import nixpkgs {}; in
- drv: pkgs.lib.overrideDerivation drv (args: {
- __noChroot = true;
- });
+ let
+ pkgs = import nixpkgs {};
+
+ # XXX: The `python' derivation contains a `modules' attribute that makes
+ # `overrideDerivation' fail with "cannot coerce an attribute set (except
+ # a derivation) to a string", so just remove it.
+ pythonKludge = drv: removeAttrs drv [ "modules" ];
+ in
+ drv:
+ if builtins.isAttrs drv
+ then pkgs.lib.overrideDerivation (pythonKludge drv) (args: {
+ __noChroot = true;
+ buildNativeInputs = map unchroot args.buildNativeInputs;
+ propagatedBuildNativeInputs =
+ map unchroot args.propagatedBuildNativeInputs;
+ })
+ else drv;
# The Guile used to bootstrap the whole thing. It's normally
# downloaded by the build system, but here we download it via a