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

37 lines
721 B
Nix
Raw Normal View History

{ stdenv, fetchgit, coreutils, curl, gnused, inotifyTools, jq, ncurses, sshpass, ... }:
2015-08-05 22:21:40 +00:00
stdenv.mkDerivation {
2015-12-20 20:07:37 +00:00
name = "cac-1.0.2";
2015-08-05 22:21:40 +00:00
src = fetchgit {
2015-12-20 20:07:37 +00:00
url = http://cgit.cd.retiolum/cac;
rev = "3d6aef3631aa2e0becba447ed9c36a268dcf8bb5";
sha256 = "4f584ef8d53a003818ec6608d2cccda42fc7806cd6f9fa9ad179346f3f59744c";
2015-08-05 22:21:40 +00:00
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase =
let
path = stdenv.lib.makeSearchPath "bin" [
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:07:37 +00:00
sed 's;^_main .*;PATH=${path} &;' < ./cac > $out/bin/cac
2015-08-05 22:21:40 +00:00
chmod +x $out/bin/cac
'';
}