1{ stdenv, fetchurl, cmake, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35 }:
2
3# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77
4stdenv.mkDerivation rec {
5 name = "${python.libPrefix}-pyside-shiboken-${version}";
6 version = "1.2.4";
7
8 src = fetchurl {
9 url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz";
10 sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4";
11 };
12
13 enableParallelBuilding = true;
14
15 buildInputs = [ cmake libxml2 libxslt pysideApiextractor pysideGeneratorrunner python sphinx qt4 ];
16
17 preConfigure = ''
18 echo "preConfigure: Fixing shiboken_generator install target."
19 substituteInPlace generator/CMakeLists.txt --replace \
20 \"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/
21 '';
22 patches = if isPy35 then [ ./shiboken_py35.patch ] else null;
23
24 cmakeFlags = if isPy3k then "-DUSE_PYTHON3=TRUE" else null;
25
26 meta = {
27 description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
28 license = stdenv.lib.licenses.gpl2;
29 homepage = "http://www.pyside.org/docs/shiboken/";
30 maintainers = [ stdenv.lib.maintainers.chaoflow ];
31 platforms = stdenv.lib.platforms.all;
32 };
33}