summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-02-05 14:03:41 +0100
committerVladimír Čunát <vcunat@gmail.com>2017-02-05 14:09:22 +0100
commit3b583d943ee31f36d422167aed391689f5ab93f0 (patch)
tree93f43986418c89142f3adb271deb4369b08da2b6 /pkgs/build-support/setup-hooks
parent372cb3760e7e3f7dc544e83b252628f5fe1cef03 (diff)
parent5ae18574fcea525861e721fb6cb510630a3ad1ec (diff)
downloadnixlib-3b583d943ee31f36d422167aed391689f5ab93f0.tar
nixlib-3b583d943ee31f36d422167aed391689f5ab93f0.tar.gz
nixlib-3b583d943ee31f36d422167aed391689f5ab93f0.tar.bz2
nixlib-3b583d943ee31f36d422167aed391689f5ab93f0.tar.lz
nixlib-3b583d943ee31f36d422167aed391689f5ab93f0.tar.xz
nixlib-3b583d943ee31f36d422167aed391689f5ab93f0.tar.zst
nixlib-3b583d943ee31f36d422167aed391689f5ab93f0.zip
Merge #19328: mkWrapper fix and docs
Diffstat (limited to 'pkgs/build-support/setup-hooks')
-rw-r--r--pkgs/build-support/setup-hooks/make-wrapper.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh
index d922db5ccf58..4f55493ae483 100644
--- a/pkgs/build-support/setup-hooks/make-wrapper.sh
+++ b/pkgs/build-support/setup-hooks/make-wrapper.sh
@@ -1,8 +1,28 @@
+# construct an executable file that wraps the actual executable
+# makeWrapper EXECUTABLE ARGS
+
+# ARGS:
+# --argv0 NAME      : set name of executed process to NAME
+#                     (otherwise it’s called …-wrapped)
+# --set   VAR VAL   : add VAR with value VAL to the executable’s environment
+# --unset VAR       : remove VAR from the environment
+# --run   COMMAND   : run command before the executable
+#                     The command can push extra flags to a magic list variable
+#                     extraFlagsArray, which are then added to the invocation
+#                     of the executable
+# --add-flags FLAGS : add FLAGS to invocation of executable
+
+# --prefix          ENV SEP VAL   : suffix/prefix ENV with VAL, separated by SEP
+# --suffix
+# --suffix-each     ENV SEP VALS  : like --suffix, but VALS is a list
+# --prefix-contents ENV SEP FILES : like --suffix-each, but contents of FILES
+#                                   are read first and used as VALS
+# --suffix-contents
 makeWrapper() {
     local original=$1
     local wrapper=$2
     local params varName value command separator n fileNames
-    local argv0 flagsBefore flags
+    local argv0 flagsBefore flags extraFlagsArray
 
     mkdir -p "$(dirname $wrapper)"