2021-01-15 06:43:14 +00:00
|
|
|
{ lib
|
2022-08-16 17:10:56 +00:00
|
|
|
, stdenv
|
2020-05-14 07:36:02 +00:00
|
|
|
, buildGoModule
|
2020-04-19 00:13:49 +00:00
|
|
|
, fetchFromGitHub
|
2020-09-06 02:07:46 +00:00
|
|
|
, go-md2man
|
2020-04-19 00:13:49 +00:00
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, gpgme
|
|
|
|
, lvm2
|
|
|
|
, btrfs-progs
|
2020-05-13 11:37:48 +00:00
|
|
|
, libapparmor
|
2020-04-19 00:13:49 +00:00
|
|
|
, libselinux
|
|
|
|
, libseccomp
|
2019-08-20 11:44:49 +00:00
|
|
|
}:
|
2018-02-12 11:10:40 +00:00
|
|
|
|
2020-05-14 07:36:02 +00:00
|
|
|
buildGoModule rec {
|
2019-09-12 09:19:02 +00:00
|
|
|
pname = "buildah";
|
2022-08-10 12:45:46 +00:00
|
|
|
version = "1.27.0";
|
2018-02-12 11:10:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-04-19 00:13:49 +00:00
|
|
|
owner = "containers";
|
|
|
|
repo = "buildah";
|
2020-09-11 20:12:03 +00:00
|
|
|
rev = "v${version}";
|
2022-08-10 12:45:46 +00:00
|
|
|
sha256 = "sha256-xaUOCinP46aSKcxkpvDKollRRBYlrLql737YaOkQPzc=";
|
2018-02-12 11:10:40 +00:00
|
|
|
};
|
2019-05-21 18:26:25 +00:00
|
|
|
|
2020-04-28 01:50:57 +00:00
|
|
|
outputs = [ "out" "man" ];
|
2018-02-12 11:10:40 +00:00
|
|
|
|
2020-05-14 07:36:02 +00:00
|
|
|
vendorSha256 = null;
|
2018-02-12 11:10:40 +00:00
|
|
|
|
2020-08-04 00:26:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-09-06 02:07:46 +00:00
|
|
|
nativeBuildInputs = [ go-md2man installShellFiles pkg-config ];
|
2020-05-13 11:37:48 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gpgme
|
2022-08-16 17:10:56 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
btrfs-progs
|
2020-05-13 11:37:48 +00:00
|
|
|
libapparmor
|
|
|
|
libseccomp
|
|
|
|
libselinux
|
|
|
|
lvm2
|
|
|
|
];
|
2018-02-12 11:10:40 +00:00
|
|
|
|
2019-08-20 11:44:49 +00:00
|
|
|
buildPhase = ''
|
2021-03-31 06:52:07 +00:00
|
|
|
runHook preBuild
|
2020-05-13 11:37:48 +00:00
|
|
|
patchShebangs .
|
2022-08-17 05:50:45 +00:00
|
|
|
make bin/buildah
|
2020-09-06 02:07:46 +00:00
|
|
|
make -C docs GOMD2MAN="${go-md2man}/bin/go-md2man"
|
2021-03-31 06:52:07 +00:00
|
|
|
runHook postBuild
|
2019-08-20 11:44:49 +00:00
|
|
|
'';
|
2018-02-12 11:10:40 +00:00
|
|
|
|
2020-05-11 19:27:58 +00:00
|
|
|
installPhase = ''
|
2021-03-31 06:52:07 +00:00
|
|
|
runHook preInstall
|
2020-09-06 02:07:46 +00:00
|
|
|
install -Dm755 bin/buildah $out/bin/buildah
|
2020-05-11 19:27:58 +00:00
|
|
|
installShellCompletion --bash contrib/completions/bash/buildah
|
2019-08-20 11:44:49 +00:00
|
|
|
make -C docs install PREFIX="$man"
|
2021-03-31 06:52:07 +00:00
|
|
|
runHook postInstall
|
2018-02-12 11:10:40 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 06:43:14 +00:00
|
|
|
meta = with lib; {
|
2018-02-12 11:10:40 +00:00
|
|
|
description = "A tool which facilitates building OCI images";
|
2020-02-28 19:32:15 +00:00
|
|
|
homepage = "https://buildah.io/";
|
2020-01-15 03:22:22 +00:00
|
|
|
changelog = "https://github.com/containers/buildah/releases/tag/v${version}";
|
2019-09-12 09:19:02 +00:00
|
|
|
license = licenses.asl20;
|
2020-04-03 10:11:26 +00:00
|
|
|
maintainers = with maintainers; [ Profpatsch ] ++ teams.podman.members;
|
2018-02-12 11:10:40 +00:00
|
|
|
};
|
|
|
|
}
|