From 61443e9d9060c01a80797ebf539dd1c59008192b Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 26 Jul 2024 16:05:53 +0200 Subject: [PATCH] faiss: fix build with swig 4.2 --- .../development/libraries/science/math/faiss/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/libraries/science/math/faiss/default.nix b/pkgs/development/libraries/science/math/faiss/default.nix index 9b7b4d268197..ac19356d1a73 100644 --- a/pkgs/development/libraries/science/math/faiss/default.nix +++ b/pkgs/development/libraries/science/math/faiss/default.nix @@ -63,6 +63,15 @@ stdenv.mkDerivation { }) ]; + postPatch = '' + # Remove the following substituteInPlace when updating + # to a release that contains change from PR + # https://github.com/facebookresearch/faiss/issues/3239 + # that fixes building faiss with swig 4.2.x + substituteInPlace faiss/python/swigfaiss.swig \ + --replace-fail '#ifdef SWIGWORDSIZE64' '#if (__SIZEOF_LONG__ == 8)' + ''; + buildInputs = [ blas swig