Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / tools / buildah / default.nix
bloba6761a7350c786e691e4a0cc7ad550cf120fd92b
1 { lib
2 , stdenv
3 , buildGoModule
4 , fetchFromGitHub
5 , go-md2man
6 , installShellFiles
7 , pkg-config
8 , gpgme
9 , lvm2
10 , btrfs-progs
11 , libapparmor
12 , libselinux
13 , libseccomp
14 , testers
15 , buildah
18 buildGoModule rec {
19   pname = "buildah";
20   version = "1.32.2";
22   src = fetchFromGitHub {
23     owner = "containers";
24     repo = "buildah";
25     rev = "v${version}";
26     hash = "sha256-Av4wrJ+anVu1pTSFTpaseBhj+7ECsRoKb1bATrUKYuo=";
27   };
29   outputs = [ "out" "man" ];
31   vendorHash = null;
33   doCheck = false;
35   nativeBuildInputs = [ go-md2man installShellFiles pkg-config ];
37   buildInputs = [
38     gpgme
39   ] ++ lib.optionals stdenv.isLinux [
40     btrfs-progs
41     libapparmor
42     libseccomp
43     libselinux
44     lvm2
45   ];
47   buildPhase = ''
48     runHook preBuild
49     patchShebangs .
50     make bin/buildah
51     make -C docs GOMD2MAN="go-md2man"
52     runHook postBuild
53   '';
55   installPhase = ''
56     runHook preInstall
57     install -Dm755 bin/buildah $out/bin/buildah
58     installShellCompletion --bash contrib/completions/bash/buildah
59     make -C docs install PREFIX="$man"
60     runHook postInstall
61   '';
63   passthru.tests.version = testers.testVersion {
64     package = buildah;
65   };
67   meta = with lib; {
68     description = "A tool which facilitates building OCI images";
69     homepage = "https://buildah.io/";
70     changelog = "https://github.com/containers/buildah/releases/tag/v${version}";
71     license = licenses.asl20;
72     maintainers = with maintainers; [ ] ++ teams.podman.members;
73   };