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

40 lines
659 B
Nix
Raw Normal View History

{ fetchgit, lib, stdenv
, coreutils, gnugrep, gnused, jq, nix
}:
2015-09-25 20:56:28 +00:00
stdenv.mkDerivation {
2016-06-29 11:56:28 +00:00
name = "get-1.4.1";
2015-09-25 20:56:28 +00:00
src = fetchgit {
2016-11-10 22:15:33 +00:00
url = http://cgit.ni.krebsco.de/get;
2016-06-29 11:56:28 +00:00
rev = "41c0c35805ec1708729f73d14650d8ebc94a405b";
sha256 = "0rx1qsbb4py14795yhhqwlvaibj2569fqm7x2671l868xi59h9f9";
2015-09-25 20:56:28 +00:00
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase =
let
path = lib.makeBinPath [
2015-09-25 20:56:28 +00:00
coreutils
gnugrep
gnused
jq
nix
];
in
''
mkdir -p $out/bin
sed \
'1s,.*,&\nPATH=${path},' \
< ./get \
> $out/bin/get
chmod +x $out/bin/get
'';
}