From 9a03bfb35d79e97d6c3e9a5ed885f3505bc77568 Mon Sep 17 00:00:00 2001 From: Arthur Gautier Date: Thu, 31 Jul 2025 09:34:17 -0700 Subject: [PATCH] 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 ``` --- pkgs/development/python-modules/m2crypto/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/m2crypto/default.nix b/pkgs/development/python-modules/m2crypto/default.nix index ae7672fd205e..ca976b887cf6 100644 --- a/pkgs/development/python-modules/m2crypto/default.nix +++ b/pkgs/development/python-modules/m2crypto/default.nix @@ -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";