diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-02-13 12:33:29 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-02-13 12:33:29 +0100 |
commit | 7257dedd7cf28634e08fc0458ed34a183065b70e (patch) | |
tree | 53d0274ecfd0474666bceec021ce059e428a4b47 /pkgs/build-support | |
parent | 7c3588d8ddc35909ca56394c3a5464d6e1551fe0 (diff) | |
parent | 563b491ce89bafaa928beba19a37f6381bfc60d0 (diff) | |
download | nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.gz nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.bz2 nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.lz nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.xz nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.zst nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/setup-hooks/make-wrapper.sh | 2 | ||||
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh index bc12be0fa36c..06891893e8c1 100644 --- a/pkgs/build-support/setup-hooks/make-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-wrapper.sh @@ -8,7 +8,7 @@ assertExecutable() { } # construct an executable file that wraps the actual executable -# makeWrapper EXECUTABLE ARGS +# makeWrapper EXECUTABLE OUT_PATH ARGS # ARGS: # --argv0 NAME : set name of executed process to NAME diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 7543433640a3..454ef8912b3b 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -258,15 +258,17 @@ rec { * Example: * * # Symlinks hello path in store to current $out/hello - * linkFarm "hello" entries = [ { name = "hello"; path = pkgs.hello; } ]; + * linkFarm "hello" [ { name = "hello"; path = pkgs.hello; } ]; * */ - linkFarm = name: entries: runCommand name { preferLocalBuild = true; } - ("mkdir -p $out; cd $out; \n" + - (lib.concatMapStrings (x: '' - mkdir -p "$(dirname '${x.name}')" - ln -s '${x.path}' '${x.name}' - '') entries)); + linkFarm = name: entries: runCommand name { preferLocalBuild = true; allowSubstitutes = false; } + ''mkdir -p $out + cd $out + ${lib.concatMapStrings (x: '' + mkdir -p "$(dirname ${lib.escapeShellArg x.name})" + ln -s ${lib.escapeShellArg x.path} ${lib.escapeShellArg x.name} + '') entries} + ''; /* Print an error message if the file with the specified name and |