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

38 lines
684 B
Nix
Raw Normal View History

2015-09-25 20:56:28 +00:00
{ coreutils, gnugrep, gnused, fetchgit, jq, nix, stdenv, ... }:
stdenv.mkDerivation {
2015-09-27 11:55:37 +00:00
name = "get-1.1.1";
2015-09-25 20:56:28 +00:00
src = fetchgit {
url = http://cgit.cd.retiolum/get;
2015-09-27 11:55:37 +00:00
rev = "e64826a4f5f74cbaa895e538b97d0e523e9709f9";
sha256 = "4d1aa07bba52f697cf7aa7ad1b02b9ff41598dfea83c578e77b8d81e3e8830d2";
2015-09-25 20:56:28 +00:00
};
phases = [
"unpackPhase"
"installPhase"
];
installPhase =
let
path = stdenv.lib.makeSearchPath "bin" [
coreutils
gnugrep
gnused
jq
nix
];
in
''
mkdir -p $out/bin
sed \
'1s,.*,&\nPATH=${path},' \
< ./get \
> $out/bin/get
chmod +x $out/bin/get
'';
}