summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/withGetopt.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2017-10-17 21:35:17 +0200
committerlassulus <lassulus@lassul.us>2017-10-17 21:35:17 +0200
commit9af86e7134ae2f134bc93baf5d0332ad2a77f9f9 (patch)
treebf04c0844e560c03a0a156be1013b3b1fd329184 /krebs/5pkgs/simple/withGetopt.nix
parent4667bb8e4111abde822ae57993a29929c5cc9aad (diff)
parent3c810fef8ac062689a76de26b782d57692ddac90 (diff)
Merge remote-tracking branch 'ni/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 196e6765..179051bd 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 ","