Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

libgpg-error: fix on ARM

(cherry picked from commit 7a77439b03ba2b0b1967b9f9b9c556719a9a25f4)

authored by Nikolay Amiantov and committed by Florian Klink a0bd25dd d6cfc781

+13 -5
+13 -5
pkgs/development/libraries/libgpg-error/default.nix
··· 1 - { stdenv, buildPackages, fetchurl, gettext 2 - , hostPlatform, genPosixLockObjOnly ? false 1 + { stdenv, lib, fetchpatch, buildPackages, fetchurl, gettext 2 + , genPosixLockObjOnly ? false 3 3 }: let 4 - genPosixLockObjOnlyAttrs = stdenv.lib.optionalAttrs genPosixLockObjOnly { 4 + genPosixLockObjOnlyAttrs = lib.optionalAttrs genPosixLockObjOnly { 5 5 buildPhase = '' 6 6 cd src 7 7 make gen-posix-lock-obj ··· 24 24 sha256 = "0jfsfnh9bxlxiwxws60yah4ybjw2hshmvqp31pri4m4h8ivrbnry"; 25 25 }; 26 26 27 + patches = [ 28 + # Fix builds on ARM, AArch64 29 + (fetchpatch { 30 + url = "https://github.com/gpg/libgpg-error/commit/791177de023574223eddf7288eb7c5a0721ac623.patch"; 31 + sha256 = "0vqfw0ak1j37wf6sk9y9vmdyk3kxdxkldhs0bv2waa76s11cmdx0"; 32 + }) 33 + ]; 34 + 27 35 postPatch = '' 28 36 sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure 29 - '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' 37 + '' + lib.optionalString stdenv.hostPlatform.isMusl '' 30 38 ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h 31 39 ''; 32 40 ··· 39 47 nativeBuildInputs = [ gettext ]; 40 48 41 49 postConfigure = 42 - stdenv.lib.optionalString stdenv.isSunOS 50 + lib.optionalString stdenv.isSunOS 43 51 # For some reason, /bin/sh on OpenIndiana leads to this at the end of the 44 52 # `config.status' run: 45 53 # ./config.status[1401]: shift: (null): bad number