summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/git-hooks/default.nix
diff options
context:
space:
mode:
authornin <nineinchnade@gmail.com>2017-03-07 16:27:15 +0100
committernin <nineinchnade@gmail.com>2017-03-07 16:27:15 +0100
commit2edd8ca37b5c134b697315fd7ab603807760e6d6 (patch)
tree4fa4df81774907b797d04707028406788d7297e1 /krebs/5pkgs/git-hooks/default.nix
parent01868340e25ffb05ea8b784c5cdf47c251157dfb (diff)
parentc05db2409061f721ba454f4bf79e635ee13a6f11 (diff)
Merge remote-tracking branch 'prism/newest'
Diffstat (limited to 'krebs/5pkgs/git-hooks/default.nix')
-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
+}