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

38 lines
665 B
Nix
Raw Normal View History

2015-09-25 20:56:28 +00:00
{ coreutils, gnugrep, gnused, fetchgit, jq, nix, stdenv, ... }:
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
2016-03-03 18:45:46 +00:00
path = stdenv.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
'';
}