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-11-19 00:13:47 +00:00
|
|
|
version = "1.18.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = "buildah";
|
|
|
|
rev = "v${version}";
|
2020-11-19 00:13:47 +00:00
|
|
|
sha256 = "0kn31y5g7269mjaw5ddfsiaan93s62i8zzxg4xl01dg3dkkadwc4";
|
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
|
|
|
};
|
|
|
|
}
|