@@ -32,6 +32,8 @@ rec {
3232 name = "nix-user-chroot-2c52b5f";
3333 src = ./nix-user-chroot;
3434
35+ makeFlags = [];
36+
3537 # hack to use when /nix/store is not available
3638 postFixup = ''
3739 exe=$out/bin/nix-user-chroot
@@ -72,26 +74,20 @@ rec {
7274 targets = [ "${script}" ] ++ extraTargets;
7375 };
7476
75− # special case handling because of impurities in nix bootstrap
76− # anything that needs Nix will have to have these setup before they can be run
77− nix-bootstrap-nix = let
78− nix-user-chroot' = nix-user-chroot.override {
79− buildInputs = [ cacert gnutar bzip2 gzip coreutils ];
80− makeFlags = [
81− ''NIX_SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt"''
82− ''NIX_PATH="nixpkgs=https://github.com/matthewbauer/nixpkgs/archive/nix-bundle.tar.gz"''
83− ''ENV_PATH="${stdenv.lib.makeBinPath [ coreutils gnutar bzip2 gzip bash ]}"''
84− ];
85− }; in { target, extraTargets ? [], run }: nix-bootstrap { inherit target extraTargets run nix-user-chroot'; };
77+ nix-bootstrap-nix = {target, run, extraTargets ? []}:
78+ nix-bootstrap-path {
79+ inherit target run;
80+ extraTargets = [ gnutar bzip2 xz gzip coreutils bash ];
81+ };
8682
8783 # special case adding path to the environment before launch
8884 nix-bootstrap-path = let
89− nix-user-chroot'' = targets: nix-user-chroot.override {
90− buildInputs = targets;
91− makeFlags = [
85+ nix-user-chroot'' = targets: nix-user-chroot.overrideDerivation (o: {
86+ buildInputs = o.buildInputs ++ targets;
87+ makeFlags = o.makeFlags ++ [
9288 ''ENV_PATH="${stdenv.lib.makeBinPath targets}"''
9389 ];
94− }; in { target, extraTargets ? [], run }: nix-bootstrap {
90+ }); in { target, extraTargets ? [], run }: nix-bootstrap {
9591 inherit target extraTargets run;
9692 nix-user-chroot' = nix-user-chroot'' extraTargets;
9793 };