From f06f950183ee5e124486b2bb64bf6ef0fcdfed1e Mon Sep 17 00:00:00 2001 From: ajs124 Date: Mon, 21 Nov 2022 01:49:25 +0100 Subject: [PATCH] Revert "Revert "python3: pin to openssl_1_1"" This reverts commit 017fd895276dc0e45e9a596b1aa1ad199bfc7c4d. --- .../interpreters/python/cpython/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index e84b4918afb8..424258167150 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -7,6 +7,7 @@ , mailcap, mimetypesSupport ? true , ncurses , openssl +, openssl_1_1 , readline , sqlite , tcl ? null, tk ? null, tix ? null, libX11 ? null, xorgproto ? null, x11Support ? false @@ -76,6 +77,10 @@ assert lib.assertMsg (reproducibleBuild -> (!rebuildBytecode)) with lib; let + # cpython does support/build with openssl 3.0, but some libraries using the ssl module seem to have issues with it + # null check for Minimal + openssl' = if openssl != null then openssl_1_1 else null; + buildPackages = pkgsBuildHost; inherit (passthru) pythonForBuild; @@ -116,7 +121,7 @@ let ]; buildInputs = filter (p: p != null) ([ - zlib bzip2 expat xz libffi gdbm sqlite readline ncurses openssl ] + zlib bzip2 expat xz libffi gdbm sqlite readline ncurses openssl' ] ++ optionals x11Support [ tcl tk libX11 xorgproto ] ++ optionals (bluezSupport && stdenv.isLinux) [ bluez ] ++ optionals stdenv.isDarwin [ configd ]) @@ -322,8 +327,8 @@ in with passthru; stdenv.mkDerivation { "--with-threads" ] ++ optionals (sqlite != null && isPy3k) [ "--enable-loadable-sqlite-extensions" - ] ++ optionals (openssl != null) [ - "--with-openssl=${openssl.dev}" + ] ++ optionals (openssl' != null) [ + "--with-openssl=${openssl'.dev}" ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_buggy_getaddrinfo=no" # Assume little-endian IEEE 754 floating point when cross compiling @@ -488,7 +493,7 @@ in with passthru; stdenv.mkDerivation { # Enforce that we don't have references to the OpenSSL -dev package, which we # explicitly specify in our configure flags above. disallowedReferences = - lib.optionals (openssl != null && !static) [ openssl.dev ] + lib.optionals (openssl' != null && !static) [ openssl'.dev ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ # Ensure we don't have references to build-time packages. # These typically end up in shebangs.