nixpkgs/pkgs/development/python-modules/shiboken2/default.nix
Alyssa Ross 2bfa93e01c
treewide: python{ => .pythonForBuild}.interpreter
It won't be enough to fix cross in all cases, but it is in at least
one: pywayland.  I've only made the change in cases I'm confident it's
correct, as it would be wrong to change this when python.interpreter
is used in wrappers, and possibly when it's used for running tests.
2023-02-26 20:26:17 +00:00

61 lines
1.2 KiB
Nix

{ python
, lib
, stdenv
, pyside2
, cmake
, qt5
, libxcrypt
, llvmPackages
}:
stdenv.mkDerivation {
pname = "shiboken2";
inherit (pyside2) version src;
patches = [
./nix_compile_cflags.patch
];
postPatch = ''
cd sources/shiboken2
'';
CLANG_INSTALL_DIR = llvmPackages.libclang.out;
nativeBuildInputs = [ cmake ];
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"
];
dontWrapQtApps = true;
postInstall = ''
cd ../../..
${python.pythonForBuild.interpreter} setup.py egg_info --build-type=shiboken2
cp -r shiboken2.egg-info $out/${python.sitePackages}/
rm $out/bin/shiboken_tool.py
'';
meta = with lib; {
description = "Generator for the PySide2 Qt bindings";
license = with licenses; [ gpl2 lgpl21 ];
homepage = "https://wiki.qt.io/Qt_for_Python";
maintainers = with maintainers; [ gebner ];
broken = stdenv.isDarwin;
};
}