summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/withGetopt.nix
diff options
context:
space:
mode:
authornin <nineinchnade@gmail.com>2017-10-17 21:37:13 +0200
committernin <nineinchnade@gmail.com>2017-10-17 21:37:13 +0200
commit10850a202732728f4b95da7208005617606c2062 (patch)
treec3d506a70fc715369b42dfc31849c7155f035c6a /krebs/5pkgs/simple/withGetopt.nix
parent9afe5210f2a44cacac4f3527b6c8b561d9e4296b (diff)
parent9af86e7134ae2f134bc93baf5d0332ad2a77f9f9 (diff)
Merge remote-tracking branch 'temp/master'
Diffstat (limited to 'krebs/5pkgs/simple/withGetopt.nix')
-rw-r--r--krebs/5pkgs/simple/withGetopt.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/withGetopt.nix b/krebs/5pkgs/simple/withGetopt.nix
index 196e6765a..179051bdf 100644
--- a/krebs/5pkgs/simple/withGetopt.nix
+++ b/krebs/5pkgs/simple/withGetopt.nix
@@ -1,5 +1,5 @@
with import <stockholm/lib>;
-{ utillinux, writeDash }:
+{ coreutils, quote, utillinux, writeDash }:
opt-spec: cmd-spec: let
@@ -43,6 +43,9 @@ in writeDash wrapper-name ''
unset ${opt.varname}
'') opts)}
+ WITHGETOPT_ORIG_ARGS=$(${quote}/bin/quote "$@")
+ export WITHGETOPT_ORIG_ARGS
+
args=$(${utillinux}/bin/getopt \
-l ${shell.escape
(concatMapStringsSep ","