libgpgperror: Add derivation for gen-posix-lock-obj to help in cross-compilation

This commit is contained in:
Shea Levy 2018-02-24 20:51:04 -05:00
parent 3d8a664729
commit 7d7b7a03fa
No known key found for this signature in database
GPG Key ID: 5C0BD6957D86FE27
2 changed files with 23 additions and 3 deletions

@ -1,6 +1,21 @@
{ stdenv, buildPackages, fetchurl, gettext }:
{ stdenv, buildPackages, fetchurl, gettext
, genPosixLockObjOnly ? false
}: let
genPosixLockObjOnlyAttrs = stdenv.lib.optionalAttrs genPosixLockObjOnly {
buildPhase = ''
cd src
make gen-posix-lock-obj
'';
stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -m755 gen-posix-lock-obj $out/bin
'';
outputs = [ "out" ];
outputBin = "out";
};
in stdenv.mkDerivation (rec {
name = "libgpg-error-${version}";
version = "1.27";
@ -49,4 +64,4 @@ stdenv.mkDerivation rec {
platforms = platforms.all;
maintainers = [ maintainers.fuuzetsu maintainers.vrthra ];
};
}
} // genPosixLockObjOnlyAttrs)

@ -9714,6 +9714,11 @@ with pkgs;
libgpgerror = callPackage ../development/libraries/libgpg-error { };
# https://github.com/gpg/libgpg-error/blob/70058cd9f944d620764e57c838209afae8a58c78/README#L118-L140
libgpgerror-gen-posix-lock-obj = libgpgerror.override {
genPosixLockObjOnly = true;
};
libgphoto2 = callPackage ../development/libraries/libgphoto2 { };
libgpod = callPackage ../development/libraries/libgpod {