2017-07-25 23:35:53 +02:00
|
|
|
{ lib, fetchurl, cmake, buildPythonPackage, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35, isPy36 }:
|
2011-12-17 21:16:45 +01:00
|
|
|
|
2017-04-30 10:29:45 +02:00
|
|
|
# This derivation provides a Python module and should therefore be called via `python-packages.nix`.
|
2015-12-09 11:05:26 +01:00
|
|
|
# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77
|
2017-04-30 10:29:45 +02:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyside-shiboken";
|
2015-12-10 21:40:00 +01:00
|
|
|
version = "1.2.4";
|
2011-12-17 21:16:45 +01:00
|
|
|
|
2017-04-30 10:29:45 +02:00
|
|
|
format = "other";
|
|
|
|
|
2014-08-01 13:50:09 +02:00
|
|
|
src = fetchurl {
|
2015-12-10 21:40:00 +01:00
|
|
|
url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz";
|
|
|
|
sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4";
|
2011-12-17 21:16:45 +01:00
|
|
|
};
|
|
|
|
|
2017-08-26 10:14:51 +02:00
|
|
|
|
2011-12-17 21:16:45 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-12-09 11:05:26 +01:00
|
|
|
buildInputs = [ cmake libxml2 libxslt pysideApiextractor pysideGeneratorrunner python sphinx qt4 ];
|
2011-12-17 21:16:45 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
echo "preConfigure: Fixing shiboken_generator install target."
|
|
|
|
substituteInPlace generator/CMakeLists.txt --replace \
|
|
|
|
\"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/
|
|
|
|
'';
|
2017-08-26 10:14:51 +02:00
|
|
|
|
|
|
|
# gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86
|
|
|
|
patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36) ./shiboken_py35.patch);
|
2011-12-17 21:16:45 +01:00
|
|
|
|
2015-12-09 11:05:26 +01:00
|
|
|
cmakeFlags = if isPy3k then "-DUSE_PYTHON3=TRUE" else null;
|
|
|
|
|
2011-12-17 21:16:45 +01:00
|
|
|
meta = {
|
|
|
|
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
|
2017-04-30 10:29:45 +02:00
|
|
|
license = lib.licenses.gpl2;
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = http://www.pyside.org/docs/shiboken/;
|
2017-04-30 10:29:45 +02:00
|
|
|
maintainers = [ lib.maintainers.chaoflow ];
|
|
|
|
platforms = lib.platforms.all;
|
2011-12-17 21:16:45 +01:00
|
|
|
};
|
|
|
|
}
|