-
-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathrelease.nix
More file actions
53 lines (46 loc) · 1.04 KB
/
release.nix
File metadata and controls
53 lines (46 loc) · 1.04 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
nixpkgs ? <nixpkgs>,
nixpkgs' ? import nixpkgs { },
}:
with nixpkgs';
stdenv.mkDerivation rec {
pname = "nix-bundle";
name = "${pname}-${version}";
version = "0.4.0";
src = ./.;
# coreutils, gnutar is actually needed by nix for bootstrap
buildInputs = [
nix
coreutils
makeWrapper
gnutar
gzip
bzip2
];
nixBundlePath = lib.makeBinPath [
nix
coreutils
gnutar
gzip
bzip2
];
nixRunPath = lib.makeBinPath [
nix
coreutils
];
makeFlags = [ "PREFIX=$(out)" ];
postInstall = ''
mkdir -p $out/bin
makeWrapper $out/share/nix-bundle/nix-bundle.sh $out/bin/nix-bundle \
--prefix PATH : ${nixBundlePath}
makeWrapper $out/share/nix-bundle/nix-run.sh $out/bin/nix-run \
--prefix PATH : ${nixRunPath}
'';
meta = with lib; {
maintainers = [ maintainers.matthewbauer ];
platforms = platforms.all;
description = "Create bundles from Nixpkgs attributes";
license = licenses.mit;
homepage = "https://github.com/matthewbauer/nix-bundle";
};
}