From a15736cbb0f23e74b47decc363a4cbf45850a0c4 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Oct 2017 20:01:53 +0200 Subject: quote: init --- krebs/5pkgs/simple/quote.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 krebs/5pkgs/simple/quote.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/quote.nix b/krebs/5pkgs/simple/quote.nix new file mode 100644 index 000000000..7731e14bf --- /dev/null +++ b/krebs/5pkgs/simple/quote.nix @@ -0,0 +1,13 @@ +{ jq, writeDashBin }: + +# usage: quote [ARGS...] +writeDashBin "quote" '' + set -efu + prefix= + for x; do + y=$(${jq}/bin/jq -nr --arg x "$x" '$x | @sh "\(.)"') + echo -n "$prefix$y" + prefix=' ' + done + echo +'' -- cgit v1.2.3 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/5pkgs') 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 From 3c810fef8ac062689a76de26b782d57692ddac90 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Oct 2017 20:25:20 +0200 Subject: populate: 1.2.4 -> 1.2.5 --- krebs/5pkgs/simple/populate/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/populate/default.nix b/krebs/5pkgs/simple/populate/default.nix index 3989585ab..78ee2f042 100644 --- a/krebs/5pkgs/simple/populate/default.nix +++ b/krebs/5pkgs/simple/populate/default.nix @@ -13,12 +13,12 @@ in stdenv.mkDerivation rec { name = "populate"; - version = "1.2.4"; + version = "1.2.5"; src = fetchgit { url = http://cgit.ni.krebsco.de/populate; rev = "refs/tags/v${version}"; - sha256 = "0az41vaxfwrh9l19z3cbc7in8pylrnyc0xkzk6773xg2nj4g8a28"; + sha256 = "10s4x117zp5whqq991xzw1i2jc1xhl580kx8hhzv8f1b4c9carx1"; }; phases = [ -- cgit v1.2.3