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

40 lines
788 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-09-26 17:27:01 +00:00
name = "cac-1.0.0";
2015-08-05 22:21:40 +00:00
src = fetchgit {
url = http://cgit.cd.retiolum/cac;
2015-09-26 17:27:01 +00:00
rev = "14de1d3c78385e3f8b6d694f5d799eb1b613159e";
sha256 = "9b2a3d47345d6f8f27d9764c4f2f2acff17d3dde145dd0e674e4183e9312fec3";
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
sed \
2015-08-05 23:02:49 +00:00
's,^\( true) \)\(cac "$@";;\)$,\1 PATH=${path}${PATH+:$PATH} \2,' \
2015-08-05 22:21:40 +00:00
< ./cac \
> $out/bin/cac
chmod +x $out/bin/cac
'';
}