Skip to content

Commit

Permalink
Don't create symbolic links as a store path root.
Browse files Browse the repository at this point in the history
This commit is a workaround for NixOS/nix#10525 and nlewo/nix2container#127
  • Loading branch information
Atry committed Apr 17, 2024
1 parent c9b8d0a commit bac15b7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flake-modules/nix-ld.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ topLevel@{ flake-parts-lib, inputs, ... }: {
'';

type = lib.types.listOf lib.types.path;
default = [];
default = [ ];

};

config.environmentVariables = {
NIX_LD =
toString (pkgs.runCommand "ld.so" { } ''
ln -s "$(cat '${pkgs.stdenv.cc}/nix-support/dynamic-linker')" $out
'');
NIX_LD = "${pkgs.runCommand "ld.so" { } ''
mkdir -p "$out/lib"
ln -s "$(< ${pkgs.stdenv.cc}/nix-support/dynamic-linker)" "$out"/lib/ld.so
''}/lib/ld.so";
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath common.config.nixLdLibraries;
};

Expand Down

0 comments on commit bac15b7

Please sign in to comment.