summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/git-hooks/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-03-04 22:49:24 +0100
committertv <tv@krebsco.de>2017-03-04 22:49:24 +0100
commit286fc7045b3ad8dea36386d8de4a1fc59fd70c80 (patch)
tree99641145490c1b1b03a760f4517e3b2f4a392132 /krebs/5pkgs/git-hooks/default.nix
parent6435001c48d865ba96f0f784ee9c0bcf03204e1e (diff)
git-hooks.irc-announce: simplify file structure
Diffstat (limited to 'krebs/5pkgs/git-hooks/default.nix')
-rw-r--r--krebs/5pkgs/git-hooks/default.nix17
1 files changed, 6 insertions, 11 deletions
diff --git a/krebs/5pkgs/git-hooks/default.nix b/krebs/5pkgs/git-hooks/default.nix
index 9355a878c..3b9d1b3b0 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
@@ -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
+}