stockholm/krebs/5pkgs/simple/populate/default.nix

41 lines
626 B
Nix
Raw Normal View History

{ fetchgit, lib, stdenv
, coreutils, findutils, git, gnused, jq, openssh, pass, rsync
2017-12-15 02:29:00 +00:00
}:
2016-07-16 17:10:20 +00:00
let
PATH = lib.makeBinPath [
2016-07-16 17:10:20 +00:00
coreutils
2017-12-15 02:29:00 +00:00
findutils
2016-07-16 23:12:30 +00:00
git
2017-12-14 23:14:30 +00:00
gnused
2016-07-16 17:10:20 +00:00
jq
openssh
2017-12-15 02:29:00 +00:00
pass
2016-07-16 17:10:20 +00:00
rsync
];
in
stdenv.mkDerivation rec {
name = "populate";
2018-02-28 13:15:29 +00:00
version = "2.3.0";
2016-07-16 17:10:20 +00:00
src = fetchgit {
2016-11-10 22:15:33 +00:00
url = http://cgit.ni.krebsco.de/populate;
2016-07-16 17:10:20 +00:00
rev = "refs/tags/v${version}";
2018-02-28 13:15:29 +00:00
sha256 = "05zr132k1s3a1cc879lvhb83hax7dbfmsbrnxmh7dxjcdg3yhxd7";
2016-07-16 17:10:20 +00:00
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase = ''
sed \
'1s,.*,&\nPATH=${PATH},' \
-i bin/populate
cp -r . $out
'';
}