2020-10-27 00:29:36 +00:00
|
|
|
{ lib, fetchFromGitHub, buildPythonPackage
|
|
|
|
, cmake
|
|
|
|
, isPy35
|
|
|
|
, isPy36
|
|
|
|
, isPy37
|
|
|
|
, isPy3k
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
, pkg-config
|
|
|
|
, pysideApiextractor
|
|
|
|
, pysideGeneratorrunner
|
|
|
|
, python
|
|
|
|
, qt4
|
|
|
|
, sphinx
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyside-shiboken";
|
|
|
|
version = "1.2.4";
|
|
|
|
format = "other";
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PySide";
|
|
|
|
repo = "Shiboken";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0x2lyg52m6a0vn0665pgd1z1qrydglyfxxcggw6xzngpnngb6v5v";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config pysideApiextractor pysideGeneratorrunner sphinx qt4 ];
|
|
|
|
|
|
|
|
buildInputs = [ python libxml2 libxslt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure = ''
|
2020-11-03 02:18:15 +00:00
|
|
|
cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$dev")
|
2020-04-24 23:36:52 +00:00
|
|
|
echo "preConfigure: Fixing shiboken_generator install target."
|
|
|
|
substituteInPlace generator/CMakeLists.txt --replace \
|
|
|
|
\"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/
|
|
|
|
'';
|
|
|
|
|
|
|
|
# gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86
|
|
|
|
patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36 || isPy37) ./shiboken_py35.patch);
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
cmakeFlags = lib.optionals isPy3k [
|
|
|
|
"-DUSE_PYTHON3=TRUE"
|
|
|
|
"-DPYTHON3_INCLUDE_DIR=${lib.getDev python}/include/${python.libPrefix}"
|
|
|
|
"-DPYTHON3_LIBRARY=${lib.getLib python}/lib"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
homepage = "http://www.pyside.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ ];
|
2021-03-09 03:18:52 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|