2020-10-20 07:03:03 +01:00
|
|
|
{ lib, fetchFromGitHub, buildPythonPackage
|
2020-10-20 07:00:43 +01:00
|
|
|
, cmake
|
2020-10-20 07:03:03 +01:00
|
|
|
, isPy35
|
|
|
|
, isPy36
|
|
|
|
, isPy37
|
|
|
|
, isPy3k
|
2020-10-20 07:00:43 +01:00
|
|
|
, libxml2
|
|
|
|
, libxslt
|
2020-10-20 07:03:03 +01:00
|
|
|
, pkg-config
|
2020-10-20 07:00:43 +01:00
|
|
|
, pysideApiextractor
|
|
|
|
, pysideGeneratorrunner
|
|
|
|
, python
|
|
|
|
, qt4
|
2020-10-20 07:03:03 +01:00
|
|
|
, sphinx
|
2020-10-20 07:00:43 +01:00
|
|
|
}:
|
2011-12-17 20:16:45 +00:00
|
|
|
|
2017-04-30 09:29:45 +01:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyside-shiboken";
|
2015-12-10 20:40:00 +00:00
|
|
|
version = "1.2.4";
|
2017-04-30 09:29:45 +01:00
|
|
|
format = "other";
|
2020-10-20 07:03:03 +01:00
|
|
|
disabled = !isPy3k;
|
2017-04-30 09:29:45 +01:00
|
|
|
|
2020-10-20 07:03:03 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PySide";
|
|
|
|
repo = "Shiboken";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0x2lyg52m6a0vn0665pgd1z1qrydglyfxxcggw6xzngpnngb6v5v";
|
2011-12-17 20:16:45 +00:00
|
|
|
};
|
|
|
|
|
2020-10-20 07:00:43 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config pysideApiextractor pysideGeneratorrunner sphinx qt4 ];
|
|
|
|
|
|
|
|
buildInputs = [ python libxml2 libxslt ];
|
2011-12-17 20:16:45 +00:00
|
|
|
|
2020-11-01 15:22:00 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2011-12-17 20:16:45 +00:00
|
|
|
preConfigure = ''
|
2020-11-01 15:22:00 +00:00
|
|
|
cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$dev")
|
2011-12-17 20:16:45 +00:00
|
|
|
echo "preConfigure: Fixing shiboken_generator install target."
|
|
|
|
substituteInPlace generator/CMakeLists.txt --replace \
|
|
|
|
\"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/
|
|
|
|
'';
|
2017-08-26 09:14:51 +01:00
|
|
|
|
|
|
|
# gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86
|
2018-12-08 13:56:19 +00:00
|
|
|
patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36 || isPy37) ./shiboken_py35.patch);
|
2011-12-17 20:16:45 +00:00
|
|
|
|
2020-10-20 07:00:43 +01:00
|
|
|
cmakeFlags = lib.optionals isPy3k [
|
|
|
|
"-DUSE_PYTHON3=TRUE"
|
|
|
|
"-DPYTHON3_INCLUDE_DIR=${lib.getDev python}/include/${python.libPrefix}"
|
|
|
|
"-DPYTHON3_LIBRARY=${lib.getLib python}/lib"
|
|
|
|
];
|
2015-12-09 10:05:26 +00:00
|
|
|
|
2011-12-17 20:16:45 +00:00
|
|
|
meta = {
|
|
|
|
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
|
2017-04-30 09:29:45 +01:00
|
|
|
license = lib.licenses.gpl2;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.pyside.org/docs/shiboken/";
|
2019-02-22 15:14:13 +00:00
|
|
|
maintainers = [ ];
|
2017-04-30 09:29:45 +01:00
|
|
|
platforms = lib.platforms.all;
|
2011-12-17 20:16:45 +00:00
|
|
|
};
|
|
|
|
}
|