nixpkgs/pkgs/development/tools/buildah/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.4 KiB
Nix
Raw Normal View History

{ 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
, go-md2man
2020-04-19 00:13:49 +00:00
, installShellFiles
, pkg-config
, gpgme
, lvm2
, btrfs-progs
, libapparmor
2020-04-19 00:13:49 +00:00
, libselinux
, libseccomp
, testers
, buildah
}:
2018-02-12 11:10:40 +00:00
2020-05-14 07:36:02 +00:00
buildGoModule rec {
pname = "buildah";
2023-12-25 11:36:53 +00:00
version = "1.34.0";
2018-02-12 11:10:40 +00:00
src = fetchFromGitHub {
2020-04-19 00:13:49 +00:00
owner = "containers";
repo = "buildah";
rev = "v${version}";
2023-12-25 11:36:53 +00:00
hash = "sha256-LX7yc2FnCiquHV/tESJV/VkuUYXbRNSxmMzVpSz/F8w=";
2018-02-12 11:10:40 +00:00
};
outputs = [ "out" "man" ];
2018-02-12 11:10:40 +00:00
vendorHash = null;
2018-02-12 11:10:40 +00:00
doCheck = false;
nativeBuildInputs = [ go-md2man installShellFiles pkg-config ];
buildInputs = [
gpgme
2022-08-16 17:10:56 +00:00
] ++ lib.optionals stdenv.isLinux [
btrfs-progs
libapparmor
libseccomp
libselinux
lvm2
];
2018-02-12 11:10:40 +00:00
buildPhase = ''
2021-03-31 06:52:07 +00:00
runHook preBuild
patchShebangs .
make bin/buildah
make -C docs GOMD2MAN="go-md2man"
2021-03-31 06:52:07 +00:00
runHook postBuild
'';
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
install -Dm755 bin/buildah $out/bin/buildah
2020-05-11 19:27:58 +00:00
installShellCompletion --bash contrib/completions/bash/buildah
make -C docs install PREFIX="$man"
2021-03-31 06:52:07 +00:00
runHook postInstall
2018-02-12 11:10:40 +00:00
'';
passthru.tests.version = testers.testVersion {
package = buildah;
};
meta = with lib; {
2018-02-12 11:10:40 +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; [ ] ++ teams.podman.members;
2018-02-12 11:10:40 +00:00
};
}