python3Packages.m2crypto: fixup darwin build

darwin builds would fail with the following output:
```
INFO:spawn:swig -python -Isystem_shadowing -Isystem_shadowing -I/nix/store/03yi1jcbkpb693las8rkq4wmakg5m8yx-apple-sdk-11.3/Platf
orms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include -I/nix/store/riv3i1wrig5kaf89wgpx46581f71gfqb-python3-3.13.5/incl
ude/python3.13 -I/usr/include/openssl -cpperraswarn -includeall -builtin -outdir build/lib.macosx-11.3-arm64-cpython-313/M2Crypt
o -o src/SWIG/_m2crypto_wrap.c src/SWIG/_m2crypto.i
src/SWIG/_m2crypto.i:62: Error: Unable to find 'openssl/opensslv.h'
src/SWIG/_m2crypto.i:68: Error: Unable to find 'openssl/safestack.h'
src/SWIG/_evp.i:12: Error: Unable to find 'openssl/opensslconf.h'
src/SWIG/_rc4.i:5: Error: Unable to find 'openssl/opensslconf.h'
src/SWIG/_ec.i:7: Error: Unable to find 'openssl/opensslconf.h'
error: command '/nix/store/mhpryadgkrbvbslrgc6lbcz2b5yzcprq-swig-4.3.1/bin/swig' failed with exit code 1
```
This commit is contained in:
Arthur Gautier 2025-07-31 09:34:17 -07:00
parent f8de8add74
commit 9a03bfb35d

View File

@ -40,6 +40,7 @@ buildPythonPackage rec {
"-Wno-error=implicit-function-declaration"
"-Wno-error=incompatible-pointer-types"
]);
OPENSSL_PATH = lib.optionalString stdenv.hostPlatform.isDarwin "${openssl.dev}";
}
// lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
CPP = "${stdenv.cc.targetPrefix}cpp";