pyside: fix on Python 3.x, closes #25328
Pyside requires several tools that do not provide Python modules. They therefore do not need to be build Python-version dependent and so we move them out of `python-packages.nix`. Furthermore, shiboken needs libxml2 and libxslt libraries but not their Python bindings.
This commit is contained in:
parent
d729a25a3e
commit
a4aaf5adfd
@ -1,6 +1,9 @@
|
||||
{ stdenv, fetchurl, cmake, libxml2, libxslt, python, sphinx, qt4 }:
|
||||
{ stdenv, fetchurl, cmake, libxml2, libxslt, python2, qt4 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
# 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 ]);
|
||||
in stdenv.mkDerivation {
|
||||
name = "pyside-apiextractor-0.10.10";
|
||||
|
||||
src = fetchurl {
|
||||
@ -10,7 +13,7 @@ stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ cmake libxml2 libxslt sphinx qt4 ];
|
||||
buildInputs = [ cmake qt4 pythonEnv libxml2 libxslt ];
|
||||
|
||||
meta = {
|
||||
description = "Eases the development of bindings of Qt-based libraries for high level languages by automating most of the process";
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ lib, fetchurl, cmake, python, buildPythonPackage, pysideGeneratorrunner, pysideShiboken, qt4 }:
|
||||
|
||||
# This derivation provides a Python module and should therefore be called via `python-packages.nix`.
|
||||
buildPythonPackage rec {
|
||||
name = "pyside-${version}";
|
||||
version = "1.2.4";
|
||||
|
@ -1,7 +1,12 @@
|
||||
{ stdenv, fetchurl, cmake, pysideApiextractor, python, sphinx, qt4 }:
|
||||
{ stdenv, fetchurl, cmake, pysideApiextractor, python2, qt4 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "pyside-generatorrunner-0.6.16";
|
||||
# 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 ]);
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "pyside-generatorrunner";
|
||||
version = "0.6.16";
|
||||
name = "${pname}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/PySide/Generatorrunner/archive/0.6.16.tar.gz";
|
||||
@ -10,7 +15,7 @@ stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ cmake pysideApiextractor sphinx qt4 ];
|
||||
buildInputs = [ cmake pysideApiextractor qt4 pythonEnv ];
|
||||
|
||||
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";
|
||||
|
@ -1,10 +1,14 @@
|
||||
{ stdenv, fetchurl, cmake, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35 }:
|
||||
{ lib, fetchurl, cmake, buildPythonPackage, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35 }:
|
||||
|
||||
# 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
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pyside-shiboken-${version}";
|
||||
buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "pyside-shiboken";
|
||||
version = "1.2.4";
|
||||
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz";
|
||||
sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4";
|
||||
@ -25,9 +29,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
license = lib.licenses.gpl2;
|
||||
homepage = "http://www.pyside.org/docs/shiboken/";
|
||||
maintainers = [ stdenv.lib.maintainers.chaoflow ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainers = [ lib.maintainers.chaoflow ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
{ stdenv, fetchurl, cmake, pyside, python, qt4, pysideShiboken }:
|
||||
{ lib, fetchurl, cmake, pyside, qt4, pysideShiboken, buildPythonPackage }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "pyside-tools-0.2.15";
|
||||
# This derivation provides a Python module and should therefore be called via `python-packages.nix`.
|
||||
buildPythonPackage rec {
|
||||
pname = "pyside-tools";
|
||||
version = "0.2.15";
|
||||
name = "${pname}-${version}";
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/PySide/Tools/archive/0.2.15.tar.gz";
|
||||
@ -10,13 +14,13 @@ stdenv.mkDerivation {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ cmake pyside python qt4 pysideShiboken ];
|
||||
buildInputs = [ cmake pyside qt4 pysideShiboken ];
|
||||
|
||||
meta = {
|
||||
description = "Tools for pyside, the LGPL-licensed Python bindings for the Qt cross-platform application and UI framework";
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
license = lib.licenses.gpl2;
|
||||
homepage = "http://www.pyside.org";
|
||||
maintainers = [ stdenv.lib.maintainers.chaoflow ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainers = [ lib.maintainers.chaoflow ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
@ -6124,6 +6124,11 @@ with pkgs;
|
||||
pythonPackages = python3Packages;
|
||||
};
|
||||
|
||||
# These pyside tools do not provide any Python modules and are meant to be here.
|
||||
# See ../development/python-modules/pyside/default.nix for details.
|
||||
pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { };
|
||||
pysideGeneratorrunner = callPackage ../development/python-modules/pyside/generatorrunner.nix { };
|
||||
|
||||
svg2tikz = python27Packages.svg2tikz;
|
||||
|
||||
pyrex = pyrex095;
|
||||
|
@ -49,8 +49,11 @@ let
|
||||
fetchSource = {pname, version, sha256}:
|
||||
# Fetch a source tarball.
|
||||
let
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.tar.gz";
|
||||
in pkgs.fetchurl {inherit url sha256;};
|
||||
urls = [
|
||||
"mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.tar.gz"
|
||||
"mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.zip"
|
||||
];
|
||||
in pkgs.fetchurl {inherit urls sha256;};
|
||||
fetcher = (if format == "wheel" then fetchWheel
|
||||
else if format == "setuptools" then fetchSource
|
||||
else throw "Unsupported kind ${kind}");
|
||||
@ -369,11 +372,9 @@ in {
|
||||
|
||||
pyside = callPackage ../development/python-modules/pyside { };
|
||||
|
||||
pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { };
|
||||
|
||||
pysideGeneratorrunner = callPackage ../development/python-modules/pyside/generatorrunner.nix { };
|
||||
|
||||
pysideShiboken = callPackage ../development/python-modules/pyside/shiboken.nix { };
|
||||
pysideShiboken = callPackage ../development/python-modules/pyside/shiboken.nix {
|
||||
inherit (pkgs) libxml2 libxslt; # Do not need the Python bindings.
|
||||
};
|
||||
|
||||
pysideTools = callPackage ../development/python-modules/pyside/tools.nix { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user