stockholm/krebs/5pkgs/cac/default.nix

40 lines
772 B
Nix
Raw Normal View History

2015-12-20 20:13:54 +00:00
{ stdenv, fetchgit, bc, coreutils, curl, gnused, inotifyTools, jq, ncurses, sshpass, ... }:
2015-08-05 22:21:40 +00:00
stdenv.mkDerivation {
2015-12-20 20:13:54 +00:00
name = "cac-1.0.3";
2015-08-05 22:21:40 +00:00
src = fetchgit {
2015-12-20 20:07:37 +00:00
url = http://cgit.cd.retiolum/cac;
2015-12-20 20:13:54 +00:00
rev = "22acc1b990ac7d97c16344fbcbc2621e24cdf915";
sha256 = "135b740617c983b3f46a1983d4744be17340d5146a0a0de0dff4bb7a53688f2f";
2015-08-05 22:21:40 +00:00
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase =
let
path = stdenv.lib.makeSearchPath "bin" [
2015-12-20 20:13:54 +00:00
bc
2015-08-05 22:21:40 +00:00
coreutils
curl
gnused
inotifyTools
2015-08-05 22:21:40 +00:00
jq
ncurses
sshpass
2015-08-05 22:21:40 +00:00
];
in
''
mkdir -p $out/bin
2015-12-20 20:13:54 +00:00
sed < ./cac > $out/bin/cac '
s;^_cac_main .*;PATH=${path}''${PATH+:$PATH} &;
'
2015-08-05 22:21:40 +00:00
chmod +x $out/bin/cac
'';
}