From 22280d63115445994733e6a4cc40d87bc34b059c Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Mon, 26 Dec 2022 15:10:14 +0200 Subject: [PATCH] python.pkgs.shiboken2: bugfix Building python.pkgs.shiboken2 fails for python version older than 3.9, due to crypt.h header issue related to older glibc (#202262). The fix is to use libxrypto for these older python versions. --- .../python-modules/shiboken2/default.nix | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/shiboken2/default.nix b/pkgs/development/python-modules/shiboken2/default.nix index c4210cfeda2e..53ea30ca6823 100644 --- a/pkgs/development/python-modules/shiboken2/default.nix +++ b/pkgs/development/python-modules/shiboken2/default.nix @@ -1,5 +1,12 @@ -{ python, lib, stdenv, pyside2 -, cmake, qt5, llvmPackages }: +{ python +, lib +, stdenv +, pyside2 +, cmake +, qt5 +, libxcrypt +, llvmPackages +}: stdenv.mkDerivation { pname = "shiboken2"; @@ -17,7 +24,18 @@ stdenv.mkDerivation { CLANG_INSTALL_DIR = llvmPackages.libclang.out; nativeBuildInputs = [ cmake ]; - buildInputs = [ llvmPackages.libclang python python.pkgs.setuptools qt5.qtbase qt5.qtxmlpatterns ]; + + buildInputs = [ + llvmPackages.libclang + python + python.pkgs.setuptools + qt5.qtbase + qt5.qtxmlpatterns + ] ++ (lib.optionals (python.pythonOlder "3.9") [ + # see similar issue: 202262 + # libxcrypt is required for crypt.h for building older python modules + libxcrypt + ]); cmakeFlags = [ "-DBUILD_TESTS=OFF"