krebs pkgs cac: init at 07ef31c

This commit is contained in:
tv 2015-08-06 00:21:40 +02:00
parent 01681b908f
commit a982edd25d
3 changed files with 38 additions and 0 deletions

36
krebs/5pkgs/cac.nix Normal file
View File

@ -0,0 +1,36 @@
{ stdenv, fetchgit, coreutils, curl, gnused, jq, ... }:
stdenv.mkDerivation {
name = "cac";
src = fetchgit {
url = http://cgit.cd.retiolum/cac;
rev = "07ef31c50613634e88a31233d1fcd2ec3e52bfe8";
sha256 = "4e94709a3f580a53983ca418fa0b470817ac917aa1b2d095f2420afd36ea9158";
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase =
let
path = stdenv.lib.makeSearchPath "bin" [
coreutils
curl
gnused
jq
];
in
''
mkdir -p $out/bin
sed \
's,^\( true) \)\(cac "$@";;\)$,\1 PATH=${path} \2,' \
< ./cac \
> $out/bin/cac
chmod +x $out/bin/cac
'';
}

View File

@ -6,6 +6,7 @@ in
pkgs //
{
cac = callPackage ./cac.nix {};
dic = callPackage ./dic.nix {};
genid = callPackage ./genid.nix {};
github-hosts-sync = callPackage ./github-hosts-sync.nix {};

View File

@ -91,6 +91,7 @@ in
sxiv
texLive
tmux
tvpkgs.cac
tvpkgs.dic
zathura