2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
2020-05-15 21:57:56 +00:00
|
|
|
, buildGoModule
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2020-09-25 04:45:31 +00:00
|
|
|
, go-md2man
|
2020-04-24 23:36:52 +00:00
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, gpgme
|
|
|
|
, lvm2
|
|
|
|
, btrfs-progs
|
2020-05-15 21:57:56 +00:00
|
|
|
, libapparmor
|
2020-04-24 23:36:52 +00:00
|
|
|
, libselinux
|
|
|
|
, libseccomp
|
|
|
|
}:
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "buildah";
|
2020-10-27 00:29:36 +00:00
|
|
|
version = "1.16.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = "buildah";
|
|
|
|
rev = "v${version}";
|
2020-10-27 00:29:36 +00:00
|
|
|
sha256 = "1d2k7n1d9mpkyjy7hp1svl34ssai62df3mp5awsill092dlwn8p2";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
outputs = [ "out" "man" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
vendorSha256 = null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
btrfs-progs
|
|
|
|
gpgme
|
|
|
|
libapparmor
|
|
|
|
libseccomp
|
|
|
|
libselinux
|
|
|
|
lvm2
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
patchShebangs .
|
2020-09-25 04:45:31 +00:00
|
|
|
make bin/buildah GIT_COMMIT="unknown"
|
|
|
|
make -C docs GOMD2MAN="${go-md2man}/bin/go-md2man"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
installPhase = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
install -Dm755 bin/buildah $out/bin/buildah
|
2020-05-15 21:57:56 +00:00
|
|
|
installShellCompletion --bash contrib/completions/bash/buildah
|
2020-04-24 23:36:52 +00:00
|
|
|
make -C docs install PREFIX="$man"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ Profpatsch ] ++ teams.podman.members;
|
2020-05-15 21:57:56 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|