summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/git-hooks
diff options
context:
space:
mode:
authorlassulus <lass@lassul.us>2017-03-05 00:26:56 +0100
committerlassulus <lass@lassul.us>2017-03-05 00:26:56 +0100
commitabdfd8269f3eb97d0feecd9fab1c622ebd56403c (patch)
treeffea19187190a105e7b0caf617a0215c02c281da /krebs/5pkgs/git-hooks
parent39fd77b84c7c14d6460722721726b378bdab7acd (diff)
parentd7761aed6559adba3cfa61d822165c42c90fc276 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/5pkgs/git-hooks')
-rw-r--r--krebs/5pkgs/git-hooks/default.nix19
1 files changed, 7 insertions, 12 deletions
diff --git a/krebs/5pkgs/git-hooks/default.nix b/krebs/5pkgs/git-hooks/default.nix
index 9355a878c..4017b873b 100644
--- a/krebs/5pkgs/git-hooks/default.nix
+++ b/krebs/5pkgs/git-hooks/default.nix
@@ -1,13 +1,10 @@
-{ lib, pkgs, ... }:
+{ pkgs, ... }:
-with lib;
-
-let
- out = {
- inherit irc-announce;
- };
+with import <stockholm/lib>;
+{
# TODO irc-announce should return a derivation
+ # but it cannot because krebs.git.repos.*.hooks :: attrsOf str
irc-announce = { nick, channel, server, port ? 6667, verbose ? false, branches ? [] }: ''
#! /bin/sh
set -euf
@@ -37,7 +34,7 @@ let
port=${toString port}
host=$nick
- cgit_endpoint=http://cgit.$host
+ cgit_endpoint=http://cgit.$host.r
empty=0000000000000000000000000000000000000000
@@ -99,7 +96,7 @@ let
done
if test -n "''${message-}"; then
- exec ${irc-announce-script} \
+ exec ${pkgs.irc-announce}/bin/irc-announce \
"$server" \
"$port" \
"$nick" \
@@ -107,6 +104,4 @@ let
"$message"
fi
'';
-
- irc-announce-script = "${pkgs.irc-announce}/bin/irc-announce";
-in out
+}