2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub
|
2018-07-17 21:11:16 +01:00
|
|
|
, gpgme, libgpgerror, lvm2, btrfs-progs, pkgconfig, ostree, 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";
|
2019-12-13 23:00:00 +00:00
|
|
|
version = "1.12.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}";
|
2019-12-13 23:00:00 +00:00
|
|
|
sha256 = "0lsjsfp6ls38vlgibbnsyd1m7jvmjwdmpyrd0qigp4aa2abwi4dg";
|
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-12-05 02:07:33 +00:00
|
|
|
# Disable module-mode, because Go 1.13 automatically enables it if there is
|
|
|
|
# go.mod file. Remove after https://github.com/NixOS/nixpkgs/pull/73380
|
|
|
|
GO111MODULE = "off";
|
|
|
|
|
2019-08-20 12:44:49 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-07-17 21:11:16 +01:00
|
|
|
buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs ostree 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
|
|
|
|
'';
|
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";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|