nixpkgs/pkgs/development/tools/buildah/default.nix

64 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
2020-05-14 08:36:02 +01:00
, buildGoModule
2020-04-19 01:13:49 +01:00
, fetchFromGitHub
, go-md2man
2020-04-19 01:13:49 +01:00
, installShellFiles
, pkg-config
, gpgme
, lvm2
, btrfs-progs
, libapparmor
2020-04-19 01:13:49 +01:00
, libselinux
, libseccomp
}:
2018-02-12 11:10:40 +00:00
2020-05-14 08:36:02 +01:00
buildGoModule rec {
pname = "buildah";
version = "1.19.2";
2018-02-12 11:10:40 +00:00
src = fetchFromGitHub {
2020-04-19 01:13:49 +01:00
owner = "containers";
repo = "buildah";
rev = "v${version}";
sha256 = "1gak5m4n4bfji1hcv8y5lj1m8a39rars8igqxdr89d2i45dkpbx0";
2018-02-12 11:10:40 +00:00
};
outputs = [ "out" "man" ];
2018-02-12 11:10:40 +00:00
2020-05-14 08:36:02 +01:00
vendorSha256 = null;
2018-02-12 11:10:40 +00:00
doCheck = false;
nativeBuildInputs = [ go-md2man installShellFiles pkg-config ];
buildInputs = [
btrfs-progs
gpgme
libapparmor
libseccomp
libselinux
lvm2
];
2018-02-12 11:10:40 +00:00
buildPhase = ''
patchShebangs .
make bin/buildah GIT_COMMIT="unknown"
make -C docs GOMD2MAN="${go-md2man}/bin/go-md2man"
'';
2018-02-12 11:10:40 +00:00
2020-05-11 20:27:58 +01:00
installPhase = ''
install -Dm755 bin/buildah $out/bin/buildah
2020-05-11 20:27:58 +01:00
installShellCompletion --bash contrib/completions/bash/buildah
make -C docs install PREFIX="$man"
2018-02-12 11:10:40 +00:00
'';
meta = with lib; {
2018-02-12 11:10:40 +00:00
description = "A tool which facilitates building OCI images";
homepage = "https://buildah.io/";
changelog = "https://github.com/containers/buildah/releases/tag/v${version}";
license = licenses.asl20;
2020-04-03 11:11:26 +01:00
maintainers = with maintainers; [ Profpatsch ] ++ teams.podman.members;
2020-05-11 20:27:58 +01:00
platforms = platforms.linux;
2018-02-12 11:10:40 +00:00
};
}