2017-04-28 20:14:49 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, nix, makeWrapper, coreutils, gnutar, gzip, bzip2 }:
|
2017-04-26 07:53:40 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nix-bundle";
|
2020-01-17 08:49:43 +00:00
|
|
|
version = "0.3.0";
|
2017-04-26 07:53:40 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matthewbauer";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-01-17 08:49:43 +00:00
|
|
|
sha256 = "084m9hqm1nhwln2sbg8ck2v2dprvpldxxqmd1r8fcj3dmn4bysz0";
|
2017-04-26 07:53:40 +01:00
|
|
|
};
|
|
|
|
|
2017-04-28 20:14:49 +01:00
|
|
|
# coreutils, gnutar is actually needed by nix for bootstrap
|
|
|
|
buildInputs = [ nix coreutils makeWrapper gnutar gzip bzip2 ];
|
2017-04-26 07:53:40 +01:00
|
|
|
|
2017-04-28 20:14:49 +01:00
|
|
|
binPath = lib.makeBinPath [ nix coreutils gnutar gzip bzip2 ];
|
2017-04-26 07:53:40 +01:00
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
makeWrapper $out/share/nix-bundle/nix-bundle.sh $out/bin/nix-bundle \
|
|
|
|
--prefix PATH : ${binPath}
|
2017-10-13 18:23:19 +01:00
|
|
|
cp $out/share/nix-bundle/nix-run.sh $out/bin/nix-run
|
2017-04-26 07:53:40 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
maintainers = [ maintainers.matthewbauer ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
description = "Create bundles from Nixpkgs attributes";
|
|
|
|
license = licenses.mit;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/matthewbauer/nix-bundle";
|
2017-04-26 07:53:40 +01:00
|
|
|
};
|
|
|
|
}
|