diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside')
5 files changed, 64 insertions, 16 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/apiextractor.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/apiextractor.nix index 452320e1d71c..07ddfb69fa0f 100644 --- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/apiextractor.nix +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/apiextractor.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, cmake, libxml2, libxslt, python2, qt4 }: +{ stdenv, fetchurl, cmake, libxml2, libxslt, python3, qt4 }: # This derivation does not provide any Python module and should therefore be called via `all-packages.nix`. let - pythonEnv = python2.withPackages(ps: with ps; [ sphinx ]); + pythonEnv = python3.withPackages(ps: with ps; [ sphinx ]); in stdenv.mkDerivation { name = "pyside-apiextractor-0.10.10"; @@ -13,7 +13,14 @@ in stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ cmake qt4 pythonEnv libxml2 libxslt ]; + outputs = [ "out" "dev" ]; + + preConfigure = '' + cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$dev") + ''; + + nativeBuildInputs = [ cmake pythonEnv ]; + buildInputs = [ qt4 libxml2 libxslt ]; meta = { description = "Eases the development of bindings of Qt-based libraries for high level languages by automating most of the process"; diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/default.nix index 8eae5034a4f8..2bbeb7a1233f 100644 --- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/default.nix +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/default.nix @@ -13,6 +13,12 @@ buildPythonPackage rec { enableParallelBuilding = true; + outputs = [ "out" "dev" ]; + + preConfigure = '' + cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$dev") + ''; + nativeBuildInputs = [ cmake pysideGeneratorrunner pysideShiboken qt4 ]; buildInputs = [ mesa libGL ]; diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/generatorrunner.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/generatorrunner.nix index 7cb132c1ad70..8fc505a89fc4 100644 --- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/generatorrunner.nix +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/generatorrunner.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl, cmake, pysideApiextractor, python2, qt4 }: +{ stdenv, fetchurl, cmake, pysideApiextractor, python3, qt4 }: # This derivation does not provide any Python module and should therefore be called via `all-packages.nix`. let - pythonEnv = python2.withPackages(ps: with ps; [ sphinx ]); + pythonEnv = python3.withPackages(ps: with ps; [ sphinx ]); pname = "pyside-generatorrunner"; version = "0.6.16"; in stdenv.mkDerivation { @@ -15,7 +15,14 @@ in stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ cmake pysideApiextractor qt4 pythonEnv ]; + outputs = [ "out" "dev" ]; + + preConfigure = '' + cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$dev") + ''; + + nativeBuildInputs = [ cmake pythonEnv ]; + buildInputs = [ pysideApiextractor qt4 ]; meta = { description = "Eases the development of binding generators for C++ and Qt-based libraries by providing a framework to help automating most of the process"; diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken.nix index c5561525db50..cf7192f92ffb 100644 --- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken.nix +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken.nix @@ -1,24 +1,42 @@ -{ lib, fetchurl, cmake, buildPythonPackage, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35, isPy36, isPy37 }: +{ lib, fetchFromGitHub, buildPythonPackage +, cmake +, isPy35 +, isPy36 +, isPy37 +, isPy3k +, libxml2 +, libxslt +, pkg-config +, pysideApiextractor +, pysideGeneratorrunner +, python +, qt4 +, sphinx +}: -# This derivation provides a Python module and should therefore be called via `python-packages.nix`. -# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77 buildPythonPackage rec { pname = "pyside-shiboken"; version = "1.2.4"; - format = "other"; + disabled = !isPy3k; - src = fetchurl { - url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz"; - sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4"; + src = fetchFromGitHub { + owner = "PySide"; + repo = "Shiboken"; + rev = version; + sha256 = "0x2lyg52m6a0vn0665pgd1z1qrydglyfxxcggw6xzngpnngb6v5v"; }; - enableParallelBuilding = true; - nativeBuildInputs = [ cmake libxml2 libxslt pysideApiextractor pysideGeneratorrunner python sphinx qt4 ]; + nativeBuildInputs = [ cmake pkg-config pysideApiextractor pysideGeneratorrunner sphinx qt4 ]; + + buildInputs = [ python libxml2 libxslt ]; + + outputs = [ "out" "dev" ]; preConfigure = '' + cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$dev") echo "preConfigure: Fixing shiboken_generator install target." substituteInPlace generator/CMakeLists.txt --replace \ \"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/ @@ -27,7 +45,11 @@ buildPythonPackage rec { # gcc6 patch was also sent upstream: https://github.com/pyside/Shiboken/pull/86 patches = [ ./gcc6.patch ] ++ (lib.optional (isPy35 || isPy36 || isPy37) ./shiboken_py35.patch); - cmakeFlags = lib.optional isPy3k "-DUSE_PYTHON3=TRUE"; + cmakeFlags = lib.optionals isPy3k [ + "-DUSE_PYTHON3=TRUE" + "-DPYTHON3_INCLUDE_DIR=${lib.getDev python}/include/${python.libPrefix}" + "-DPYTHON3_LIBRARY=${lib.getLib python}/lib" + ]; meta = { description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code"; diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/tools.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/tools.nix index 9698c09f3478..cc52a0502f28 100644 --- a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/tools.nix +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/tools.nix @@ -12,6 +12,12 @@ buildPythonPackage rec { sha256 = "017i2yxgjrisaifxqnl3ym8ijl63l2yl6a3474dsqhlyqz2nx2ll"; }; + outputs = [ "out" "dev" ]; + + preConfigure = '' + cmakeFlagsArray=("-DCMAKE_INSTALL_PREFIX=$dev") + ''; + nativeBuildInputs = [ cmake ]; buildInputs = [ qt4 ]; |