From c6b754a67bf1408966509dcdb404c3dad43d2190 Mon Sep 17 00:00:00 2001 From: freezeboy Date: Sun, 1 Nov 2020 14:27:03 +0100 Subject: [PATCH 1/5] pysideApiextractor: refactor to use python3 Also took the opportunity to split it to multiple outputs (cherry picked from commit 2cd5cf624ae19fd7633a22ea3a3f7986dfb611af) --- .../python-modules/pyside/apiextractor.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyside/apiextractor.nix b/pkgs/development/python-modules/pyside/apiextractor.nix index 452320e1d71..07ddfb69fa0 100644 --- a/pkgs/development/python-modules/pyside/apiextractor.nix +++ b/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"; From 335d21df857a02dbc2fc768bb2bdeee2957becdf Mon Sep 17 00:00:00 2001 From: freezeboy Date: Sun, 1 Nov 2020 15:20:17 +0100 Subject: [PATCH 2/5] pysideGeneratorrunner: refactor to use python3 --- .../python-modules/pyside/generatorrunner.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyside/generatorrunner.nix b/pkgs/development/python-modules/pyside/generatorrunner.nix index 7cb132c1ad7..8fc505a89fc 100644 --- a/pkgs/development/python-modules/pyside/generatorrunner.nix +++ b/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"; From a3e20b8dbc6c20349c0bf64e79adf20591eae6b1 Mon Sep 17 00:00:00 2001 From: freezeboy Date: Sun, 1 Nov 2020 16:22:00 +0100 Subject: [PATCH 3/5] python3Packages.pysideShiboken: refactor to use multiple outputs --- pkgs/development/python-modules/pyside/shiboken.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pyside/shiboken.nix b/pkgs/development/python-modules/pyside/shiboken.nix index b0c3368e070..cf7192f92ff 100644 --- a/pkgs/development/python-modules/pyside/shiboken.nix +++ b/pkgs/development/python-modules/pyside/shiboken.nix @@ -33,7 +33,10 @@ buildPythonPackage rec { 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/ From 5a03f8ba8054a1af6bf79857cc08d3a967815570 Mon Sep 17 00:00:00 2001 From: freezeboy Date: Sun, 1 Nov 2020 16:22:13 +0100 Subject: [PATCH 4/5] python3Packages.pysideTools: refactor to use multiple outputs --- pkgs/development/python-modules/pyside/tools.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/pyside/tools.nix b/pkgs/development/python-modules/pyside/tools.nix index 9698c09f347..cc52a0502f2 100644 --- a/pkgs/development/python-modules/pyside/tools.nix +++ b/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 ]; From b6a2387ddc9676db294bc657b3a8d495740851dc Mon Sep 17 00:00:00 2001 From: freezeboy Date: Sun, 1 Nov 2020 16:22:29 +0100 Subject: [PATCH 5/5] python3Packages.pyside: refactor to use multiple outputs --- pkgs/development/python-modules/pyside/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/pyside/default.nix b/pkgs/development/python-modules/pyside/default.nix index 8eae5034a4f..2bbeb7a1233 100644 --- a/pkgs/development/python-modules/pyside/default.nix +++ b/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 ];