2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
python,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
pyside2,
|
|
|
|
cmake,
|
|
|
|
qt5,
|
|
|
|
libxcrypt,
|
|
|
|
llvmPackages_15,
|
|
|
|
pythonAtLeast,
|
2022-12-28 21:21:41 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "shiboken2";
|
|
|
|
|
|
|
|
inherit (pyside2) version src;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches = [ ./nix_compile_cflags.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cd sources/shiboken2
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
CLANG_INSTALL_DIR = llvmPackages_15.libclang.out;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2022-12-28 21:21:41 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
llvmPackages_15.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" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2022-07-18 16:21:45 +00:00
|
|
|
cd ../../..
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py egg_info --build-type=shiboken2
|
2022-07-18 16:21:45 +00:00
|
|
|
cp -r shiboken2.egg-info $out/${python.sitePackages}/
|
2020-04-24 23:36:52 +00:00
|
|
|
rm $out/bin/shiboken_tool.py
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generator for the PySide2 Qt bindings";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "shiboken2";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
gpl2
|
|
|
|
lgpl21
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://wiki.qt.io/Qt_for_Python";
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
2024-06-05 15:53:02 +00:00
|
|
|
broken = stdenv.isDarwin || pythonAtLeast "3.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|