diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/default.nix | 39 | ||||
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/dont_ignore_optional_modules.patch | 11 |
2 files changed, 50 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/default.nix new file mode 100644 index 000000000000..ed0ab2d533aa --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/default.nix @@ -0,0 +1,39 @@ +{ buildPythonPackage, python, fetchurl, stdenv, + cmake, ninja, qt5, shiboken2 }: + +stdenv.mkDerivation rec { + pname = "pyside2"; + version = "5.15.1"; + + src = fetchurl { + url = "https://download.qt.io/official_releases/QtForPython/pyside2/PySide2-${version}-src/pyside-setup-opensource-src-${version}.tar.xz"; + sha256 = "1yn3f414ql8rrvwxlfpp2sckpmb89zj5iszgy1690mrjh7cc2xgi"; + }; + + patches = [ + ./dont_ignore_optional_modules.patch + ]; + + postPatch = '' + cd sources/pyside2 + ''; + + cmakeFlags = [ + "-DBUILD_TESTS=OFF" + "-DPYTHON_EXECUTABLE=${python.interpreter}" + ]; + + nativeBuildInputs = [ cmake ninja qt5.qmake python ]; + buildInputs = with qt5; [ + qtbase qtxmlpatterns qtmultimedia qttools qtx11extras qtlocation qtscript + qtwebsockets qtwebengine qtwebchannel qtcharts qtsensors qtsvg + ]; + propagatedBuildInputs = [ shiboken2 ]; + + meta = with stdenv.lib; { + description = "LGPL-licensed Python bindings for Qt"; + license = licenses.lgpl21; + homepage = "https://wiki.qt.io/Qt_for_Python"; + maintainers = with maintainers; [ gebner ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/dont_ignore_optional_modules.patch b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/dont_ignore_optional_modules.patch new file mode 100644 index 000000000000..c9f17bea71b4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/pyside2/dont_ignore_optional_modules.patch @@ -0,0 +1,11 @@ +--- pyside-setup-opensource-src-5.14.2/sources/cmake_helpers/helpers.cmake~ 2020-07-17 10:29:30.555285529 +0200 ++++ pyside-setup-opensource-src-5.14.2/sources/cmake_helpers/helpers.cmake 2020-07-17 10:29:49.817003683 +0200 +@@ -139,7 +139,7 @@ + # If the module was found, and also the module path is the same as the + # Qt5Core base path, we will generate the list with the modules to be installed + set(looked_in_message ". Looked in: ${${_name_dir}}") +- if("${${_name_found}}" AND (("${found_basepath}" GREATER "0") OR ("${found_basepath}" EQUAL "0"))) ++ if("${${_name_found}}") + message(STATUS "${module_state} module ${name} found (${ARGN})${looked_in_message}") + # record the shortnames for the tests + list(APPEND all_module_shortnames ${shortname}) |