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