nixpkgs/pkgs/tools/package-management/nix-bundle/default.nix

36 lines
1,000 B
Nix
Raw Normal View History

2017-04-28 19:14:49 +00:00
{ stdenv, lib, fetchFromGitHub, nix, makeWrapper, coreutils, gnutar, gzip, bzip2 }:
stdenv.mkDerivation rec {
pname = "nix-bundle";
name = "${pname}-${version}";
2017-04-28 19:14:49 +00:00
version = "0.1.3";
src = fetchFromGitHub {
owner = "matthewbauer";
repo = pname;
rev = "v${version}";
2017-04-28 19:14:49 +00:00
sha256 = "15r77pchf4s4cdv4lvw2zw1yic78k8p0n2r954qq370vscw30yac";
};
2017-04-28 19:14:49 +00:00
# coreutils, gnutar is actually needed by nix for bootstrap
buildInputs = [ nix coreutils makeWrapper gnutar gzip bzip2 ];
2017-04-28 19:14:49 +00:00
binPath = lib.makeBinPath [ nix coreutils gnutar gzip bzip2 ];
makeFlags = [ "PREFIX=$(out)" ];
postInstall = ''
mkdir -p $out/bin
makeWrapper $out/share/nix-bundle/nix-bundle.sh $out/bin/nix-bundle \
--prefix PATH : ${binPath}
'';
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;
};
}