diff options
author | Jules Aguillon <jules@j3s.fr> | 2022-05-14 19:23:15 +0200 |
---|---|---|
committer | Jules Aguillon <jules@j3s.fr> | 2022-05-14 19:23:15 +0200 |
commit | f2a91a66798a192fa14f94a04aad1e9ce5ea1814 (patch) | |
tree | 285508e8a388bf0e8167d7c1709a63f38b8b42e5 /pkgs/build-support | |
parent | 4cebbee7039f5ef5e96ecdf81805338a63e5e5d5 (diff) |
Fix string context lost in `linkFarm`
```nix let pkgs = import ./. {}; in pkgs.linkFarm "test" [ { name = "foo"; path = ./README.md; } ] ``` The nix code above generates this result: (`nix build -f test.nix`) ``` lrwxrwxrwx 1 root root 31 Jan 1 1970 /nix/store/98mdz626n99w0467q4r203q154bnnli9-test/foo -> /home/juloo/w/nixpkgs/README.md ``` With this patch, the target file is naturally copied into the store: ``` lrwxrwxrwx 1 root root 53 Jan 1 1970 /nix/store/ndvffnardifqwzbp07g15llav55r5k1m-test/foo -> /nix/store/9rqwjskbbgbflrpyhzi6rak2j7jspr5f-README.md ```
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index bd14971fe78b4..aab032928cc3c 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -477,7 +477,7 @@ rec { cd $out ${lib.concatMapStrings (x: '' mkdir -p "$(dirname ${lib.escapeShellArg x.name})" - ln -s ${lib.escapeShellArg x.path} ${lib.escapeShellArg x.name} + ln -s ${x.path} ${lib.escapeShellArg x.name} '') entries} ''; |