-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello-v4.nix
More file actions
35 lines (28 loc) · 642 Bytes
/
hello-v4.nix
File metadata and controls
35 lines (28 loc) · 642 Bytes
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
let
nixpkgs = import <nixpkgs> { };
in
derivation rec {
name = "hello";
src = nixpkgs.fetchurl {
url = "https://ftp.gnu.org/gnu/hello/hello-2.12.1.tar.gz";
hash = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA=";
};
path =
with nixpkgs;
lib.concatMapStringsSep ":" (pkg: "${pkg}/bin") [
gnutar
];
buildScript = nixpkgs.writeText "buildScript" ''
set -o errexit
set -o nounset
PATH=${path};
tar xzvf $src
cd hello-2.12.1;
./configure
make
make install
'';
builder = "${nixpkgs.bash}/bin/bash";
args = [ buildScript ];
system = builtins.currentSystem;
}