From 27d37b22995c469048e2ae4dc8ff46f49b3542d7 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Oct 2017 20:06:16 +0200 Subject: withGetopt: export WITHGETOPT_ORIG_ARGS --- krebs/5pkgs/simple/withGetopt.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'krebs') 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 ; -{ 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 "," -- cgit v1.2.3