mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
ab27bcf01e
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
53 lines
1.6 KiB
Nix
53 lines
1.6 KiB
Nix
{ stdenv, buildGoPackage, fetchFromGitHub
|
||
, gpgme, libgpgerror, lvm2, btrfs-progs, pkgconfig, ostree, libselinux, libseccomp
|
||
, go-md2man }:
|
||
|
||
let
|
||
version = "1.4";
|
||
|
||
src = fetchFromGitHub {
|
||
rev = "v${version}";
|
||
owner = "containers";
|
||
repo = "buildah";
|
||
sha256 = "0b9pfi22qcqyp0im8vp02ibrwd49ghgi64d5l98z01cj52n2j2dz";
|
||
};
|
||
goPackagePath = "github.com/containers/buildah";
|
||
|
||
in buildGoPackage rec {
|
||
name = "buildah-${version}";
|
||
inherit src;
|
||
|
||
outputs = [ "bin" "man" "out" ];
|
||
|
||
inherit goPackagePath;
|
||
excludedPackages = [ "tests" ];
|
||
|
||
# Optimizations break compilation of libseccomp c bindings
|
||
hardeningDisable = [ "fortify" ];
|
||
|
||
nativeBuildInputs = [ pkgconfig go-md2man.bin ];
|
||
buildInputs = [ gpgme libgpgerror lvm2 btrfs-progs ostree libselinux libseccomp ];
|
||
|
||
# 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";
|
||
homepage = https://github.com/containers/buildah;
|
||
maintainers = with stdenv.lib.maintainers; [ Profpatsch ];
|
||
license = stdenv.lib.licenses.asl20;
|
||
};
|
||
}
|