mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02:00
docker: fix image so that nix profile works
nix profile will otherwise throw this error: error: path '/nix/var/nix/profiles/default/manifest.nix' is not in the Nix store That's not entirely true since manifest.nix is within a directory in the nix store but nix profile seems to require the manifest.nix itself to be a store path.
This commit is contained in:
parent
59a5f35802
commit
6942ee8a84
1 changed files with 7 additions and 5 deletions
12
docker.nix
12
docker.nix
|
@ -137,11 +137,8 @@ let
|
||||||
name = "root-profile-env";
|
name = "root-profile-env";
|
||||||
paths = defaultPkgs;
|
paths = defaultPkgs;
|
||||||
};
|
};
|
||||||
profile = pkgs.buildPackages.runCommand "user-environment" { } ''
|
manifest = pkgs.buildPackages.runCommand "manifest.nix" { } ''
|
||||||
mkdir $out
|
cat > $out <<EOF
|
||||||
cp -a ${rootEnv}/* $out/
|
|
||||||
|
|
||||||
cat > $out/manifest.nix <<EOF
|
|
||||||
[
|
[
|
||||||
${lib.concatStringsSep "\n" (builtins.map (drv: let
|
${lib.concatStringsSep "\n" (builtins.map (drv: let
|
||||||
outputs = drv.outputsToInstall or [ "out" ];
|
outputs = drv.outputsToInstall or [ "out" ];
|
||||||
|
@ -161,6 +158,11 @@ let
|
||||||
]
|
]
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
profile = pkgs.buildPackages.runCommand "user-environment" { } ''
|
||||||
|
mkdir $out
|
||||||
|
cp -a ${rootEnv}/* $out/
|
||||||
|
ln -s ${manifest} $out/manifest.nix
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
pkgs.runCommand "base-system"
|
pkgs.runCommand "base-system"
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue