2015-08-05 23:01:43 +00:00
|
|
|
{ stdenv, fetchgit, coreutils, curl, gnused, jq, ncurses, sshpass, ... }:
|
2015-08-05 22:21:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "cac";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = http://cgit.cd.retiolum/cac;
|
2015-08-05 22:59:34 +00:00
|
|
|
rev = "0fc9cbeba4060380f698f51bb74081e2fcefadf3";
|
|
|
|
sha256 = "9759c78aa9aa04ab82486d0f24264bff1081513bc07cac0f8b3c0bdf52260fb3";
|
2015-08-05 22:21:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
phases = [
|
|
|
|
"unpackPhase"
|
|
|
|
"installPhase"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase =
|
|
|
|
let
|
|
|
|
path = stdenv.lib.makeSearchPath "bin" [
|
|
|
|
coreutils
|
|
|
|
curl
|
|
|
|
gnused
|
|
|
|
jq
|
2015-08-05 23:01:43 +00:00
|
|
|
ncurses
|
2015-08-05 22:56:28 +00:00
|
|
|
sshpass
|
2015-08-05 22:21:40 +00:00
|
|
|
];
|
|
|
|
in
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
|
|
|
sed \
|
|
|
|
's,^\( true) \)\(cac "$@";;\)$,\1 PATH=${path} \2,' \
|
|
|
|
< ./cac \
|
|
|
|
> $out/bin/cac
|
|
|
|
|
|
|
|
chmod +x $out/bin/cac
|
|
|
|
'';
|
|
|
|
}
|