on master help sign in
Add release.nix
commit45cfa4b2bb294e489ac17b396836ad2cb7d4e568 authorMatthew Bauer <mjbauer95@gmail.com> dateFri 13 Oct 2017, 14:57 (9 years ago) parent685f1ce
1 file changed+34
release.nix+34
release.nixnew file+34
@@ -0,0 +1,34 @@
1+{ nixpkgs ? <nixpkgs>
2+, nixpkgs' ? import nixpkgs {}}: with nixpkgs';
3+
4+stdenv.mkDerivation rec {
5+ pname = "nix-bundle";
6+ name = "${pname}-${version}";
7+ version = "0.2.0";
8+
9+ src = ./.;
10+
11+ # coreutils, gnutar is actually needed by nix for bootstrap
12+ buildInputs = [ nix coreutils makeWrapper gnutar gzip bzip2 ];
13+
14+ nixBundlePath = lib.makeBinPath [ nix coreutils gnutar gzip bzip2 ];
15+ nixRunPath = lib.makeBinPath [ nix coreutils ];
16+
17+ makeFlags = [ "PREFIX=$(out)" ];
18+
19+ postInstall = ''
20+ mkdir -p $out/bin
21+ makeWrapper $out/share/nix-bundle/nix-bundle.sh $out/bin/nix-bundle \
22+ --prefix PATH : ${nixBundlePath}
23+ makeWrapper $out/share/nix-bundle/nix-run.sh $out/bin/nix-run \
24+ --prefix PATH : ${nixRunPath}
25+ '';
26+
27+ meta = with lib; {
28+ maintainers = [ maintainers.matthewbauer ];
29+ platforms = platforms.all;
30+ description = "Create bundles from Nixpkgs attributes";
31+ license = licenses.mit;
32+ homepage = https://github.com/matthewbauer/nix-bundle;
33+ };
34+}