2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub
|
2020-02-08 00:02:14 +00:00
|
|
|
, gpgme, libgpgerror, lvm2, btrfs-progs, pkgconfig, 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-02-08 00:02:14 +00:00
|
|
|
version = "1.14.0";
|
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-02-08 00:02:14 +00:00
|
|
|
sha256 = "0nbcrhfd0c14d0m9a4mkd01jxk5i503z38kv2qfz5cvfghx517qq";
|
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" ];
|
|
|
|
|
2019-08-20 12:44:49 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
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";
|
2019-09-12 10:19:02 +01:00
|
|
|
homepage = "https://github.com/containers/buildah";
|
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
|
|
|
};
|
|
|
|
}
|