Skip to content

Commit

Permalink
fix: solve the path issue of mkDevOCI
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec authored and blaggacao committed Aug 11, 2023
1 parent ac0909b commit ec2d87c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/ops/mkDevOCI.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ in
# Enable nix flakes
mkdir -p $out/etc
echo "sandbox = false" > $out/etc/nix.conf
echo "accept-flake-config = true" > $out/etc/nix.conf
echo "sandbox = false" >> $out/etc/nix.conf
echo "accept-flake-config = true" >> $out/etc/nix.conf
echo "experimental-features = nix-command flakes" >> $out/etc/nix.conf
# Increase warn timeout and whitelist all paths
Expand Down
11 changes: 10 additions & 1 deletion src/lib/ops/mkOCI.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,16 @@ in
[
(nixpkgs.buildEnv {
name = "root";
paths = [setupLinks] ++ setup;
paths =
setup
++ [
# prevent the $out`/bin` to be a symlink
(nixpkgs.runCommand "setupDirs" {}
''
mkdir -p $out/bin
'')
setupLinks
];
})
]
++ options.copyToRoot or [];
Expand Down

0 comments on commit ec2d87c

Please sign in to comment.