about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/clucene-core
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
committerAlyssa Ross <hi@alyssa.is>2023-12-01 19:00:09 +0100
commit9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d (patch)
tree4368f9e4cb2d5b93a956c085337e45cb70f1e331 /nixpkgs/pkgs/development/libraries/clucene-core
parenta9cbfb6941b47d6f50129e6e36927882392daed7 (diff)
parent2344fe1da14cb08b0c18743b207995f9b8597915 (diff)
downloadnixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.gz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.bz2
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.lz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.xz
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.zst
nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.zip
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/clucene-core')
-rw-r--r--nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix b/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix
index 18d055a387ac..d6049d284513 100644
--- a/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix
+++ b/nixpkgs/pkgs/development/libraries/clucene-core/2.x.nix
@@ -1,4 +1,4 @@
-{lib, stdenv, fetchurl, cmake, boost, zlib}:
+{lib, stdenv, fetchurl, fetchpatch, cmake, boost, zlib}:
 
 stdenv.mkDerivation rec {
   pname = "clucene-core";
@@ -40,8 +40,21 @@ stdenv.mkDerivation rec {
 
     # required for darwin and linux-musl
     ./pthread-include.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    ./fix-darwin.patch
 
-  ] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];
+    # see https://bugs.gentoo.org/869170
+    (fetchpatch {
+       url = "https://869170.bugs.gentoo.org/attachment.cgi?id=858825";
+       hash = "sha256-TbAfBKdXh+1HepZc8J6OhK1XGwhwBCMvO8QBDsad998=";
+    })
+  ];
+
+  # see https://github.com/macports/macports-ports/commit/236d43f2450c6be52dc42fd3a2bbabbaa5136201
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace src/shared/CMakeLists.txt --replace 'fstati64;_fstati64;fstat64;fstat;_fstat' 'fstat;_fstat'
+    substituteInPlace src/shared/CMakeLists.txt --replace 'stati64;_stati64;stat64;stat;_stat' 'stat;_stat'
+  '';
 
   # fails with "Unable to find executable:
   # /build/clucene-core-2.3.3.4/build/bin/cl_test"