From 540ff38c9cb4cd26ea7e6d1c358906caa487cd2a Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 29 Jul 2023 23:14:34 +0000 Subject: [PATCH] python310Packages.gssapi: support cross compilation `GSSAPI_SUPPORT_DETECT` defaults to true and instructs setup.py to perform a sanity check before enabling each gss extension. that sanity check is to `dlopen` the dependency, which fails for cross compilation. setting `GSSAPI_SUPPORT_DETECT=false` enables all extensions, it simply bypasses the `dlopen` check. --- pkgs/development/python-modules/gssapi/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/gssapi/default.nix b/pkgs/development/python-modules/gssapi/default.nix index 9b41e272b90a..30619532a4a5 100644 --- a/pkgs/development/python-modules/gssapi/default.nix +++ b/pkgs/development/python-modules/gssapi/default.nix @@ -33,6 +33,10 @@ buildPythonPackage rec { --replace 'get_output(f"{kc} gssapi --prefix")' '"${lib.getDev krb5}"' ''; + env = lib.optionalAttrs (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) { + GSSAPI_SUPPORT_DETECT = "false"; + }; + nativeBuildInputs = [ cython krb5