2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub
|
2020-02-28 19:32:15 +00:00
|
|
|
, gpgme, libgpgerror, lvm2, btrfs-progs, pkg-config, libselinux, libseccomp
|
2019-08-20 12:44:49 +01:00
|
|
|
}:
|
2018-02-12 11:10:40 +00:00
|
|
|
|
2019-09-12 10:19:02 +01:00
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "buildah";
|
2020-03-26 22:54:33 +00:00
|
|
|
version = "1.14.4";
|
2018-02-12 11:10:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-05-21 19:26:25 +01:00
|
|
|
owner = "containers";
|
|
|
|
repo = "buildah";
|
2019-09-12 10:19:02 +01:00
|
|
|
rev = "v${version}";
|
2020-03-26 22:54:33 +00:00
|
|
|
sha256 = "055xaczvqxp9qwiki2qw3576mj7qy0zzx90473wx4k7qri4csyrb";
|
2018-02-12 11:10:40 +00:00
|
|
|
};
|
2019-05-21 19:26:25 +01:00
|
|
|
|
2018-02-12 11:10:40 +00:00
|
|
|
outputs = [ "bin" "man" "out" ];
|
|
|
|
|
2019-09-12 10:19:02 +01:00
|
|
|
goPackagePath = "github.com/containers/buildah";
|
2018-02-12 11:10:40 +00:00
|
|
|
excludedPackages = [ "tests" ];
|
|
|
|
|
2020-02-28 19:32:15 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-02-08 00:02:14 +00:00
|
|
|
buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs libselinux libseccomp ];
|
2018-02-12 11:10:40 +00:00
|
|
|
|
2019-12-05 02:07:33 +00:00
|
|
|
patches = [ ./disable-go-module-mode.patch ];
|
|
|
|
|
2019-08-20 12:44:49 +01:00
|
|
|
buildPhase = ''
|
|
|
|
pushd go/src/${goPackagePath}
|
|
|
|
make GIT_COMMIT="unknown"
|
|
|
|
install -Dm755 buildah $bin/bin/buildah
|
2020-01-15 03:22:22 +00:00
|
|
|
install -Dm444 contrib/completions/bash/buildah $bin/share/bash-completion/completions/buildah
|
2019-08-20 12:44:49 +01:00
|
|
|
'';
|
2018-02-12 11:10:40 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
2019-08-20 12:44:49 +01:00
|
|
|
make -C docs install PREFIX="$man"
|
2018-02-12 11:10:40 +00:00
|
|
|
'';
|
|
|
|
|
2019-09-12 10:19:02 +01:00
|
|
|
meta = with stdenv.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 10:19:02 +01:00
|
|
|
license = licenses.asl20;
|
2019-11-12 15:02:26 +00:00
|
|
|
maintainers = with maintainers; [ Profpatsch vdemeester saschagrunert ];
|
2018-02-12 11:10:40 +00:00
|
|
|
};
|
|
|
|
}
|