blob: 13cdeca9663372552c9692878afc041dfc71a17b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
{ coreutils, gnugrep, gnused, fetchgit, jq, nix, stdenv, ... }:
stdenv.mkDerivation {
name = "get-1.4.0";
src = fetchgit {
url = http://cgit.cd.krebsco.de/get;
rev = "08757d47c480c130d69270855c6c0371f6b7d385";
sha256 = "7c609e2cde7a071bbf62241a7bea60313fdbf076b9f7b3d97226417e13e5ba9d";
};
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
'';
}
|