summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/cac-api/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-03 19:39:00 +0100
committertv <tv@krebsco.de>2016-02-03 19:39:00 +0100
commit5bc7523bb54e960f5ac00492b16519b1bce21007 (patch)
tree652efd6d25d03cbe40c068036d975d6f2ce93670 /krebs/5pkgs/cac-api/default.nix
parentcdb590be5072712c9552a98f8979aa94288dcbc8 (diff)
cac-1.0.3 -> cac-api-1.1.0
Diffstat (limited to 'krebs/5pkgs/cac-api/default.nix')
-rw-r--r--krebs/5pkgs/cac-api/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/krebs/5pkgs/cac-api/default.nix b/krebs/5pkgs/cac-api/default.nix
new file mode 100644
index 000000000..2a32bb096
--- /dev/null
+++ b/krebs/5pkgs/cac-api/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchgit, bc, coreutils, curl, gnused, inotifyTools, jq, ncurses, sshpass, ... }:
+
+stdenv.mkDerivation {
+ name = "cac-api-1.1.0";
+
+ src = fetchgit {
+ url = http://cgit.cd.krebsco.de/cac-api;
+ rev = "0809fae379239687ed1170e04311dc2880ef0aba";
+ sha256 = "357ced27c9ed88028967c934178a1d230bf38617a7494cd4632fabdd2a04fcdd";
+ };
+
+ phases = [
+ "unpackPhase"
+ "installPhase"
+ ];
+
+ installPhase =
+ let
+ path = stdenv.lib.makeSearchPath "bin" [
+ bc
+ coreutils
+ curl
+ gnused
+ inotifyTools
+ jq
+ ncurses
+ sshpass
+ ];
+ in
+ ''
+ mkdir -p $out/bin
+ cp cac-api $out/bin/cac-api
+ sed -i '
+ s;^_cac_cli_main .*;PATH=${path}''${PATH+:$PATH} &;
+ ' $out/bin/cac-api
+ '';
+}