mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
libgpgerror: fix cross-compilation
Fixes e.g. pkgsCross.aarch64-multiplatform.libgpgerror
This commit is contained in:
parent
000973d1a1
commit
909558eb27
1 changed files with 10 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
{ stdenv, lib, buildPackages, fetchurl, gettext
|
||||
, fetchpatch
|
||||
, genPosixLockObjOnly ? false
|
||||
}: let
|
||||
genPosixLockObjOnlyAttrs = lib.optionalAttrs genPosixLockObjOnly {
|
||||
|
@ -24,6 +25,15 @@ in stdenv.mkDerivation (rec {
|
|||
sha256 = "sha256-/AfnD2xhX4xPWQqON6m43S4soelAj45gRZxnRSuSXiM=";
|
||||
};
|
||||
|
||||
patches = lib.optionals (with stdenv; buildPlatform != hostPlatform) [
|
||||
# Fix cross-compilation, remove in next release
|
||||
# TODO apply unconditionally
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gpg/libgpg-error/commit/33593864cd54143db594c4237bba41e14179061c.patch";
|
||||
sha256 = "1jnd7flaj5nlc7spa6mwwygmh5fajw1n8js8f23jpw4pbgvgdv4r";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
|
||||
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
|
|
Loading…
Reference in a new issue