at 18.09-beta 39 lines 1.5 kB view raw
1{ lib, fetchurl, cmake, buildPythonPackage, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35, isPy36 }: 2 3# This derivation provides a Python module and should therefore be called via `python-packages.nix`. 4# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77 5buildPythonPackage rec { 6 pname = "pyside-shiboken"; 7 version = "1.2.4"; 8 9 format = "other"; 10 11 src = fetchurl { 12 url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz"; 13 sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4"; 14 }; 15 16 17 enableParallelBuilding = true; 18 19 buildInputs = [ cmake libxml2 libxslt pysideApiextractor pysideGeneratorrunner python sphinx qt4 ]; 20 21 preConfigure = '' 22 echo "preConfigure: Fixing shiboken_generator install target." 23 substituteInPlace generator/CMakeLists.txt --replace \ 24 \"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/ 25 ''; 26 27 # gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86 28 patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36) ./shiboken_py35.patch); 29 30 cmakeFlags = if isPy3k then "-DUSE_PYTHON3=TRUE" else null; 31 32 meta = { 33 description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code"; 34 license = lib.licenses.gpl2; 35 homepage = http://www.pyside.org/docs/shiboken/; 36 maintainers = [ lib.maintainers.chaoflow ]; 37 platforms = lib.platforms.all; 38 }; 39}