1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

docker: shrink code - use buildenv.manifest

This commit is contained in:
h0nIg 2025-06-06 23:54:15 +02:00 committed by GitHub
parent e72a0ad8c3
commit 2caccbed11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -165,12 +165,7 @@ let
echo "[]" > $out/manifest.nix
fi
'';
rootEnv = pkgs.buildPackages.buildEnv {
name = "root-profile-env";
paths = defaultPkgs;
};
# doc/manual/source/command-ref/files/manifest.nix.md
# may get replaced by pkgs.buildEnv once manifest.json can get written
manifest = pkgs.buildPackages.runCommand "manifest.nix" { } ''
cat > $out <<EOF
[
@ -200,11 +195,15 @@ let
]
EOF
'';
profile = pkgs.buildPackages.runCommand "user-environment" { } ''
mkdir $out
cp -a ${rootEnv}/* $out/
ln -s ${manifest} $out/manifest.nix
'';
profile = pkgs.buildPackages.buildEnv {
name = "root-profile-env";
paths = defaultPkgs;
postBuild = ''
mv $out/manifest $out/manifest.nix
'';
inherit manifest;
};
flake-registry-path =
if (flake-registry == null) then
null