From 7d7b7a03fa4b2d226b8c4122c2329a4dffffc019 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 24 Feb 2018 20:51:04 -0500 Subject: [PATCH] libgpgperror: Add derivation for gen-posix-lock-obj to help in cross-compilation --- .../libraries/libgpg-error/default.nix | 21 ++++++++++++++++--- pkgs/top-level/all-packages.nix | 5 +++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index e6cb62330c4e..9511d2314249 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -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) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e8158ec3a47..675ad092a30f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {