2018-07-21 02:44:44 +02:00
|
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub
|
2018-07-17 22:11:16 +02:00
|
|
|
|
, gpgme, libgpgerror, lvm2, btrfs-progs, pkgconfig, ostree, libselinux, libseccomp
|
2018-02-12 12:10:40 +01:00
|
|
|
|
, go-md2man }:
|
|
|
|
|
|
|
|
|
|
let
|
2019-06-17 17:43:41 +02:00
|
|
|
|
version = "1.9.0";
|
2018-02-12 12:10:40 +01:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-05-21 20:26:25 +02:00
|
|
|
|
rev = "v${version}";
|
|
|
|
|
owner = "containers";
|
|
|
|
|
repo = "buildah";
|
2019-06-17 17:43:41 +02:00
|
|
|
|
sha256 = "19yf93pq4vw24h76kl32c6ryvg5fp5mixakw9c6sqydf7m74z9i8";
|
2018-02-12 12:10:40 +01:00
|
|
|
|
};
|
2019-05-21 20:26:25 +02:00
|
|
|
|
|
2018-10-23 10:37:56 +02:00
|
|
|
|
goPackagePath = "github.com/containers/buildah";
|
2018-02-12 12:10:40 +01:00
|
|
|
|
|
|
|
|
|
in buildGoPackage rec {
|
|
|
|
|
name = "buildah-${version}";
|
|
|
|
|
inherit src;
|
|
|
|
|
|
|
|
|
|
outputs = [ "bin" "man" "out" ];
|
|
|
|
|
|
|
|
|
|
inherit goPackagePath;
|
|
|
|
|
excludedPackages = [ "tests" ];
|
|
|
|
|
|
2018-07-08 09:49:57 +02:00
|
|
|
|
# Optimizations break compilation of libseccomp c bindings
|
|
|
|
|
hardeningDisable = [ "fortify" ];
|
|
|
|
|
|
2018-02-12 12:10:40 +01:00
|
|
|
|
nativeBuildInputs = [ pkgconfig go-md2man.bin ];
|
2018-07-17 22:11:16 +02:00
|
|
|
|
buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs ostree libselinux libseccomp ];
|
2018-02-12 12:10:40 +01:00
|
|
|
|
|
|
|
|
|
# Copied from the skopeo package, doesn’t seem to make a difference?
|
|
|
|
|
# If something related to these libs failed, uncomment these lines.
|
|
|
|
|
/*preBuild = with lib; ''
|
|
|
|
|
export CGO_CFLAGS="-I${getDev gpgme}/include -I${getDev libgpgerror}/include -I${getDev devicemapper}/include -I${getDev btrfs-progs}/include"
|
|
|
|
|
export CGO_LDFLAGS="-L${getLib gpgme}/lib -L${getLib libgpgerror}/lib -L${getLib devicemapper}/lib"
|
|
|
|
|
'';*/
|
|
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
|
# depends on buildGoPackage not changing …
|
|
|
|
|
pushd ./go/src/${goPackagePath}/docs
|
|
|
|
|
make docs
|
|
|
|
|
make install PREFIX="$man"
|
|
|
|
|
popd
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
description = "A tool which facilitates building OCI images";
|
2018-10-23 10:37:56 +02:00
|
|
|
|
homepage = https://github.com/containers/buildah;
|
2019-04-24 15:24:07 +02:00
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ Profpatsch vdemeester ];
|
2018-02-12 12:10:40 +01:00
|
|
|
|
license = stdenv.lib.licenses.asl20;
|
|
|
|
|
};
|
|
|
|
|
}
|