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
|
2023-04-09 02:59:17 +00:00
|
|
|
, testers
|
|
|
|
, buildah
|
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";
|
2023-10-25 12:25:25 +00:00
|
|
|
version = "1.32.1";
|
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}";
|
2023-10-25 12:25:25 +00:00
|
|
|
hash = "sha256-imhl8CezFoSi0M0nMxIFL/ZVa8eDAA4s/ZVIMr/QUJ4=";
|
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
|
|
|
|
2023-02-06 20:38:21 +00:00
|
|
|
vendorHash = 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
|
2022-10-18 03:45:18 +00:00
|
|
|
make -C docs GOMD2MAN="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
|
|
|
'';
|
|
|
|
|
2023-04-09 02:59:17 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = buildah;
|
|
|
|
};
|
|
|
|
|
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;
|
2023-07-07 10:52:12 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
2018-02-12 11:10:40 +00:00
|
|
|
};
|
|
|
|
}
|