Merge pull request #157995 from LeSuisse/rpm-macos-aarch64

rpm: fix build for darwin aarch64
This commit is contained in:
markuskowa 2022-02-03 19:40:00 +01:00 committed by GitHub
commit 2f1a52c873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
{ stdenv, lib
, pkg-config, autoreconfHook
, fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libgcrypt, libarchive, nspr, nss, popt, db, xz, python, lua, llvmPackages
, sqlite, zstd
, sqlite, zstd, fetchpatch
}:
stdenv.mkDerivation rec {
@ -37,6 +37,13 @@ stdenv.mkDerivation rec {
"--sharedstatedir=/com"
];
patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Fix build for macOS aarch64
(fetchpatch {
url = "https://github.com/rpm-software-management/rpm/commit/ad87ced3990c7e14b6b593fa411505e99412e248.patch";
hash = "sha256-WYlxPGcPB5lGQmkyJ/IpGoqVfAKtMxKzlr5flTqn638=";
})
];
postPatch = ''
substituteInPlace Makefile.am --replace '@$(MKDIR_P) $(DESTDIR)$(localstatedir)/tmp' ""
'';