2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
2022-08-21 13:32:41 +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
|
2023-04-12 12:48:02 +00:00
|
|
|
, testers
|
|
|
|
, buildah
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "buildah";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.35.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = "buildah";
|
|
|
|
rev = "v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-FqgYpCvEEqgnhCHdHN1/inxMJoOjoHLc/xMfhXsA1nc=";
|
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
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
vendorHash = 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 = [
|
|
|
|
gpgme
|
2022-08-21 13:32:41 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
btrfs-progs
|
2020-05-15 21:57:56 +00:00
|
|
|
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 .
|
2022-08-21 13:32:41 +00:00
|
|
|
make bin/buildah
|
2022-10-30 15:09:59 +00:00
|
|
|
make -C docs GOMD2MAN="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
|
|
|
'';
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = buildah;
|
2024-02-29 20:09:43 +00:00
|
|
|
command = ''
|
|
|
|
XDG_DATA_HOME="$TMPDIR" XDG_CACHE_HOME="$TMPDIR" XDG_CONFIG_HOME="$TMPDIR" \
|
|
|
|
buildah --version
|
|
|
|
'';
|
2023-04-12 12:48:02 +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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "buildah";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://buildah.io/";
|
|
|
|
changelog = "https://github.com/containers/buildah/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
2023-07-15 17:15:38 +00:00
|
|
|
maintainers = with maintainers; [ ] ++ teams.podman.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
2024-02-29 20:09:43 +00:00
|
|
|
|