diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside')
7 files changed, 176 insertions, 0 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 new file mode 100644 index 000000000000..452320e1d71c --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/apiextractor.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl, cmake, libxml2, libxslt, python2, 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 ]); +in stdenv.mkDerivation { + name = "pyside-apiextractor-0.10.10"; + + src = fetchurl { + url = "https://github.com/PySide/Apiextractor/archive/0.10.10.tar.gz"; + sha256 = "1zj8yrxy08iv1pk38djxw3faimm226w6wmi0gm32w4yczblylwz3"; + }; + + enableParallelBuilding = true; + + 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"; + license = stdenv.lib.licenses.gpl2; + homepage = "http://www.pyside.org/docs/apiextractor/"; + maintainers = [ ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/default.nix new file mode 100644 index 000000000000..8eae5034a4f8 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/default.nix @@ -0,0 +1,27 @@ +{ lib, fetchurl, cmake, buildPythonPackage, pysideGeneratorrunner, pysideShiboken, qt4, mesa, libGL }: + +# This derivation provides a Python module and should therefore be called via `python-packages.nix`. +buildPythonPackage rec { + pname = "pyside"; + version = "1.2.4"; + format = "other"; + + src = fetchurl { + url = "https://github.com/PySide/PySide/archive/${version}.tar.gz"; + sha256 = "90f2d736e2192ac69e5a2ac798fce2b5f7bf179269daa2ec262986d488c3b0f7"; + }; + + enableParallelBuilding = true; + + nativeBuildInputs = [ cmake pysideGeneratorrunner pysideShiboken qt4 ]; + + buildInputs = [ mesa libGL ]; + + makeFlags = [ "QT_PLUGIN_PATH=${pysideShiboken}/lib/generatorrunner" ]; + + meta = { + description = "LGPL-licensed Python bindings for the Qt cross-platform application and UI framework"; + license = lib.licenses.lgpl21; + homepage = "http://www.pyside.org"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/gcc6.patch b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/gcc6.patch new file mode 100644 index 000000000000..440e94508c57 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/gcc6.patch @@ -0,0 +1,18 @@ +--- Shiboken-1.2.4.org/tests/libsample/simplefile.cpp 2017-08-26 09:06:27.216859143 +0100 ++++ Shiboken-1.2.4/tests/libsample/simplefile.cpp 2017-08-26 09:05:40.037029652 +0100 +@@ -90,13 +90,13 @@ + SimpleFile::exists() const + { + std::ifstream ifile(p->m_filename); +- return ifile; ++ return (bool)ifile; + } + + bool + SimpleFile::exists(const char* filename) + { + std::ifstream ifile(filename); +- return ifile; ++ return (bool)ifile; + } + diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/generatorrunner.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/generatorrunner.nix new file mode 100644 index 000000000000..7cb132c1ad70 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/generatorrunner.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, cmake, pysideApiextractor, python2, 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 ]); + pname = "pyside-generatorrunner"; + version = "0.6.16"; +in stdenv.mkDerivation { + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/PySide/Generatorrunner/archive/0.6.16.tar.gz"; + sha256 = "0vzk3cp0pfbhd921r8f1xkcz96znla39dhj074k623x9k26lj2sj"; + }; + + enableParallelBuilding = true; + + 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"; + license = stdenv.lib.licenses.gpl2; + homepage = "http://www.pyside.org/docs/generatorrunner/"; + maintainers = [ ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken.nix new file mode 100644 index 000000000000..c5561525db50 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken.nix @@ -0,0 +1,39 @@ +{ lib, fetchurl, cmake, buildPythonPackage, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35, isPy36, isPy37 }: + +# 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"; + + src = fetchurl { + url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz"; + sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4"; + }; + + + enableParallelBuilding = true; + + nativeBuildInputs = [ cmake libxml2 libxslt pysideApiextractor pysideGeneratorrunner python sphinx qt4 ]; + + preConfigure = '' + echo "preConfigure: Fixing shiboken_generator install target." + substituteInPlace generator/CMakeLists.txt --replace \ + \"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/ + ''; + + # 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"; + + meta = { + description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code"; + license = lib.licenses.gpl2; + homepage = "http://www.pyside.org/docs/shiboken/"; + maintainers = [ ]; + platforms = lib.platforms.all; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken_py35.patch b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken_py35.patch new file mode 100644 index 000000000000..fb095cf991cf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/shiboken_py35.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/Modules/FindPython3Libs.cmake b/cmake/Modules/FindPython3Libs.cmake +--- a/cmake/Modules/FindPython3Libs.cmake ++++ b/cmake/Modules/FindPython3Libs.cmake +@@ -27,7 +27,7 @@ INCLUDE(CMakeFindFrameworks) + # Search for the python framework on Apple. + # CMAKE_FIND_FRAMEWORKS(Python) + +-FOREACH(_CURRENT_VERSION 3.4 3.3 3.2 3.1 3.0) ++FOREACH(_CURRENT_VERSION 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) + IF(_CURRENT_VERSION GREATER 3.1) + SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "") + ELSE() diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/tools.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/tools.nix new file mode 100644 index 000000000000..9698c09f3478 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside/tools.nix @@ -0,0 +1,28 @@ +{ lib, buildPythonPackage, fetchFromGitHub, cmake, qt4, pyside, pysideShiboken }: + +buildPythonPackage rec { + pname = "pyside-tools"; + version = "0.2.15"; + format = "other"; + + src = fetchFromGitHub { + owner = "PySide"; + repo = "Tools"; + rev = version; + sha256 = "017i2yxgjrisaifxqnl3ym8ijl63l2yl6a3474dsqhlyqz2nx2ll"; + }; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ qt4 ]; + + propagatedBuildInputs = [ pyside pysideShiboken ]; + + meta = with lib; { + description = "Development tools (pyside-uic/rcc/lupdate) for PySide, the LGPL-licensed Python bindings for the Qt framework"; + license = licenses.gpl2; + homepage = "https://wiki.qt.io/PySide"; + maintainers = [ ]; + platforms = platforms.all; + }; +} |