From 9608226adc685caf4ec45d78e81c53638b0a1956 Mon Sep 17 00:00:00 2001 From: "Miao, ZhiCheng" Date: Mon, 26 Dec 2022 15:12:27 +0200 Subject: [PATCH] python.pkgs.pyside2: bugfix Building python.pkgs.pyside2 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/pyside2/default.nix | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pyside2/default.nix b/pkgs/development/python-modules/pyside2/default.nix index 5826ed7be160..9d6a3c640798 100644 --- a/pkgs/development/python-modules/pyside2/default.nix +++ b/pkgs/development/python-modules/pyside2/default.nix @@ -1,5 +1,13 @@ -{ python, fetchurl, lib, stdenv, - cmake, ninja, qt5, shiboken2 }: +{ python +, fetchurl +, lib +, stdenv +, cmake +, libxcrypt +, ninja +, qt5 +, shiboken2 +}: stdenv.mkDerivation rec { pname = "pyside2"; @@ -26,12 +34,29 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-I${qt5.qtdeclarative.dev}/include/QtQuick/${qt5.qtdeclarative.version}/QtQuick"; nativeBuildInputs = [ cmake ninja qt5.qmake python ]; + buildInputs = (with qt5; [ - qtbase qtxmlpatterns qtmultimedia qttools qtx11extras qtlocation qtscript - qtwebsockets qtwebengine qtwebchannel qtcharts qtsensors qtsvg - ]) ++ [ - python.pkgs.setuptools - ]; + qtbase + qtxmlpatterns + qtmultimedia + qttools + qtx11extras + qtlocation + qtscript + qtwebsockets + qtwebengine + qtwebchannel + qtcharts + qtsensors + qtsvg + ]) ++ (with python.pkgs; [ + setuptools + ]) ++ (lib.optionals (python.pythonOlder "3.9") [ + # see similar issue: 202262 + # libxcrypt is required for crypt.h for building older python modules + libxcrypt + ]); + propagatedBuildInputs = [ shiboken2 ]; dontWrapQtApps = true;