2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
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";
|
2021-07-03 03:11:41 +00:00
|
|
|
version = "1.21.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = "buildah";
|
|
|
|
rev = "v${version}";
|
2021-07-03 03:11:41 +00:00
|
|
|
sha256 = "sha256-9AYFC10AYbt/qHj5hfuLRxUwibizKk4n9rgtd5RBEQg=";
|
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 = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preBuild
|
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"
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
installPhase = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook preInstall
|
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"
|
2021-04-05 15:23:46 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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;
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|