mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
rpm: fix build for darwin aarch64
This contribution uses an upstream fix rpm-software-management/rpm#1775 To limit the chances of breaking other architectures or systems the patch is only used when we target darwin aarch64.
This commit is contained in:
parent
86a6c0c4af
commit
3504c23b78
|
@ -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' ""
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue