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-10-01 00:42:57 +00:00
name = "get-1.3.0";
2015-09-25 20:56:28 +00:00
src = fetchgit {
url = http://cgit.cd.retiolum/get;
2015-10-01 00:42:57 +00:00
rev = "fbe8f8d12ede9762fceb15b9944b69a4ee6331eb";
sha256 = "bcdf036f8b5d1467285d0998aeac7e48280adfb9e1278f9f424c9c8b5e6ed8fa";
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
'';
}