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

38 lines
677 B
Nix
Raw Normal View History

2015-09-25 20:56:28 +00:00
{ coreutils, gnugrep, gnused, fetchgit, jq, nix, stdenv, ... }:
stdenv.mkDerivation {
2016-01-05 20:26:35 +00:00
name = "get-1.4.0";
2015-09-25 20:56:28 +00:00
src = fetchgit {
2015-11-17 23:27:07 +00:00
url = http://cgit.cd.krebsco.de/get;
2016-01-05 20:26:35 +00:00
rev = "08757d47c480c130d69270855c6c0371f6b7d385";
sha256 = "7c609e2cde7a071bbf62241a7bea60313fdbf076b9f7b3d97226417e13e5ba9d";
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
'';
}