Skip to content
Snippets Groups Projects
Commit c86929e4 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

release.nix: Unchroot recursively.

* release.nix (unchroot): Operate recursively on build inputs.
parent 11a7ceb9
No related branches found
No related tags found
No related merge requests found
...@@ -30,10 +30,23 @@ let ...@@ -30,10 +30,23 @@ let
# hydra.gnu.org where we want Guix derivations to run in a chroot that lacks # hydra.gnu.org where we want Guix derivations to run in a chroot that lacks
# /bin, whereas Nixpkgs relies on /bin/sh. # /bin, whereas Nixpkgs relies on /bin/sh.
unchroot = unchroot =
let pkgs = import nixpkgs {}; in let
drv: pkgs.lib.overrideDerivation drv (args: { pkgs = import nixpkgs {};
__noChroot = true;
}); # 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 # The Guile used to bootstrap the whole thing. It's normally
# downloaded by the build system, but here we download it via a # downloaded by the build system, but here we download it via a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment