From dc7155be6cfe6f2b029fd70bcfa20d3929be6e62 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 18 Feb 2020 14:47:15 +0100 Subject: [PATCH 1/3] krops: 1.19.0 -> 1.20.0 --- submodules/krops | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/krops b/submodules/krops index f1b7112ac..ed9fc6658 160000 --- a/submodules/krops +++ b/submodules/krops @@ -1 +1 @@ -Subproject commit f1b7112ac3cbe090e96f2c82c525b6db69b82034 +Subproject commit ed9fc6658226b1525bc008205d76276f0054c6c5 From cd268ca24967733172dbe5c3fe62fefbbdf80e44 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 18 Feb 2020 14:57:16 +0100 Subject: [PATCH 2/3] krebs krops: use upstream writers --- krebs/krops.nix | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/krebs/krops.nix b/krebs/krops.nix index 1f439f622..608e46df1 100644 --- a/krebs/krops.nix +++ b/krebs/krops.nix @@ -31,18 +31,19 @@ }; }; stockholm.file = toString ../.; - stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" '' - set -efu - cd ${lib.escapeShellArg stockholm.file} - V=$(${pkgs.coreutils}/bin/date +%y.%m) - if test -d .git; then - V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty) - case $V in (*-dirty) - V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)} - esac - fi - printf %s "$V" - ''); + stockholm-version.pipe = + toString (pkgs.writers.writeDash "${name}-version" '' + set -efu + cd ${lib.escapeShellArg stockholm.file} + V=$(${pkgs.coreutils}/bin/date +%y.%m) + if test -d .git; then + V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty) + case $V in (*-dirty) + V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)} + esac + fi + printf %s "$V" + ''); }; source ={ test }: lib.evalSource [ From 3493cd74a1f6942566fbad4b89f4d3c84f964868 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 17 Mar 2020 20:06:22 +0100 Subject: [PATCH 3/3] irc-announce: fix more portable cat2 --- krebs/5pkgs/simple/irc-announce/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/krebs/5pkgs/simple/irc-announce/default.nix b/krebs/5pkgs/simple/irc-announce/default.nix index dea30a056..a90814aa9 100644 --- a/krebs/5pkgs/simple/irc-announce/default.nix +++ b/krebs/5pkgs/simple/irc-announce/default.nix @@ -24,7 +24,12 @@ pkgs.writeDashBin "irc-announce" '' # echo2 and cat2 are used output to both, stdout and stderr # This is used to see what we send to the irc server. (debug output) echo2() { echo "$*"; echo "$*" >&2; } - cat2() { (read x ; echo "$x" ; echo "$x" >&2) } + cat2() { + while read -r line; do + echo "$line" + echo "$line" >&2 + done + } # privmsg_cat transforms stdin to a privmsg privmsg_cat() { awk '{ print "PRIVMSG "ENVIRON["IRC_CHANNEL"]" :"$0 }'; }