1{ lib
2, buildGoModule
3, fetchFromGitHub
4, go-md2man
5, installShellFiles
6, pkg-config
7, gpgme
8, lvm2
9, btrfs-progs
10, libapparmor
11, libselinux
12, libseccomp
13}:
14
15buildGoModule rec {
16 pname = "buildah";
17 version = "1.23.1";
18
19 src = fetchFromGitHub {
20 owner = "containers";
21 repo = "buildah";
22 rev = "v${version}";
23 sha256 = "sha256-vAuUA51E1pufn3YvNe4yfqJHXo14iUEA5MzP3/ah+8I=";
24 };
25
26 outputs = [ "out" "man" ];
27
28 vendorSha256 = null;
29
30 doCheck = false;
31
32 nativeBuildInputs = [ go-md2man installShellFiles pkg-config ];
33
34 buildInputs = [
35 btrfs-progs
36 gpgme
37 libapparmor
38 libseccomp
39 libselinux
40 lvm2
41 ];
42
43 buildPhase = ''
44 runHook preBuild
45 patchShebangs .
46 make bin/buildah GIT_COMMIT="unknown"
47 make -C docs GOMD2MAN="${go-md2man}/bin/go-md2man"
48 runHook postBuild
49 '';
50
51 installPhase = ''
52 runHook preInstall
53 install -Dm755 bin/buildah $out/bin/buildah
54 installShellCompletion --bash contrib/completions/bash/buildah
55 make -C docs install PREFIX="$man"
56 runHook postInstall
57 '';
58
59 meta = with lib; {
60 description = "A tool which facilitates building OCI images";
61 homepage = "https://buildah.io/";
62 changelog = "https://github.com/containers/buildah/releases/tag/v${version}";
63 license = licenses.asl20;
64 maintainers = with maintainers; [ Profpatsch ] ++ teams.podman.members;
65 platforms = platforms.linux;
66 };
67}