diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2023-06-21 18:36:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 18:36:25 +0200 |
commit | 0dc60955e7cfa39994608bd2c215567b35d3c4cd (patch) | |
tree | f182945e46dc799d3d97f8782330c2d3dc3c25c2 /pkgs/development | |
parent | 00b9bdc61f963626394f652c3f67b414922bb5ee (diff) | |
parent | dff0b1b4084c64f87a369daddcaee9a12733f05d (diff) |
Merge pull request #230545 from panicgh/pyqt5-modules
python3Packages.{pyqt3d,pyqtchart,pyqtdatavisualization}: init; python3Packages.pyqt5: add options
Diffstat (limited to 'pkgs/development')
4 files changed, 239 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pyqt/5.x.nix b/pkgs/development/python-modules/pyqt/5.x.nix index f43038fac2969..6bb268d21995c 100644 --- a/pkgs/development/python-modules/pyqt/5.x.nix +++ b/pkgs/development/python-modules/pyqt/5.x.nix @@ -17,6 +17,8 @@ , withWebKit ? false , withWebSockets ? false , withLocation ? false +, withSerialPort ? false +, withTools ? false }: buildPythonPackage rec { @@ -86,6 +88,8 @@ buildPythonPackage rec { ++ lib.optional withWebKit qtwebkit ++ lib.optional withWebSockets qtwebsockets ++ lib.optional withLocation qtlocation + ++ lib.optional withSerialPort qtserialport + ++ lib.optional withTools qttools ; buildInputs = with libsForQt5; [ @@ -99,6 +103,8 @@ buildPythonPackage rec { ++ lib.optional withWebKit qtwebkit ++ lib.optional withWebSockets qtwebsockets ++ lib.optional withLocation qtlocation + ++ lib.optional withSerialPort qtserialport + ++ lib.optional withTools qttools ; propagatedBuildInputs = [ @@ -130,6 +136,8 @@ buildPythonPackage rec { ++ lib.optional withMultimedia "PyQt5.QtMultimedia" ++ lib.optional withConnectivity "PyQt5.QtBluetooth" ++ lib.optional withLocation "PyQt5.QtPositioning" + ++ lib.optional withSerialPort "PyQt5.QtSerialPort" + ++ lib.optional withTools "PyQt5.QtDesigner" ; meta = with lib; { diff --git a/pkgs/development/python-modules/pyqt3d/default.nix b/pkgs/development/python-modules/pyqt3d/default.nix new file mode 100644 index 0000000000000..c6129a08680e8 --- /dev/null +++ b/pkgs/development/python-modules/pyqt3d/default.nix @@ -0,0 +1,77 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pyqt5 +, pyqt-builder +, python +, pythonOlder +, qt3d +, setuptools +, sip +}: + +buildPythonPackage rec { + pname = "pyqt3d"; + version = "5.15.6"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + pname = "PyQt3D"; + inherit version; + hash = "sha256-fWxtVc2PwiGzE8mVwPhymjdxFJJvA3f46QEdRevziBw="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "[tool.sip.project]" "[tool.sip.project]''\nsip-include-dirs = [\"${pyqt5}/${python.sitePackages}/PyQt5/bindings\"]" + ''; + + outputs = [ "out" "dev" ]; + + enableParallelBuilding = true; + # HACK: paralellize compilation of make calls within pyqt's setup.py + # pkgs/stdenv/generic/setup.sh doesn't set this for us because + # make gets called by python code and not its build phase + # format=pyproject means the pip-build-hook hook gets used to build this project + # pkgs/development/interpreters/python/hooks/pip-build-hook.sh + # does not use the enableParallelBuilding flag + preBuild = '' + export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}" + ''; + + dontWrapQtApps = true; + + nativeBuildInputs = [ + sip + qt3d + setuptools + pyqt-builder + ]; + + buildInputs = [ + qt3d + ]; + + propagatedBuildInputs = [ + pyqt5 + ]; + + dontConfigure = true; + + # has no tests + doCheck = false; + + pythonImportsCheck = [ + "PyQt5.Qt3DCore" + ]; + + meta = with lib; { + description = "Python bindings for the Qt 3D framework"; + homepage = "https://riverbankcomputing.com/"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ panicgh ]; + }; +} diff --git a/pkgs/development/python-modules/pyqtchart/default.nix b/pkgs/development/python-modules/pyqtchart/default.nix new file mode 100644 index 0000000000000..3f95fe791574c --- /dev/null +++ b/pkgs/development/python-modules/pyqtchart/default.nix @@ -0,0 +1,77 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pyqt5 +, pyqt-builder +, python +, pythonOlder +, qtcharts +, setuptools +, sip +}: + +buildPythonPackage rec { + pname = "pyqtchart"; + version = "5.15.6"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + pname = "PyQtChart"; + inherit version; + hash = "sha256-JpF5b+kqKUphdZKlxcNeeF3JH3dZ3vnrItp532N2Izk="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "[tool.sip.project]" "[tool.sip.project]''\nsip-include-dirs = [\"${pyqt5}/${python.sitePackages}/PyQt5/bindings\"]" + ''; + + outputs = [ "out" "dev" ]; + + enableParallelBuilding = true; + # HACK: paralellize compilation of make calls within pyqt's setup.py + # pkgs/stdenv/generic/setup.sh doesn't set this for us because + # make gets called by python code and not its build phase + # format=pyproject means the pip-build-hook hook gets used to build this project + # pkgs/development/interpreters/python/hooks/pip-build-hook.sh + # does not use the enableParallelBuilding flag + preBuild = '' + export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}" + ''; + + dontWrapQtApps = true; + + nativeBuildInputs = [ + sip + qtcharts + setuptools + pyqt-builder + ]; + + buildInputs = [ + qtcharts + ]; + + propagatedBuildInputs = [ + pyqt5 + ]; + + dontConfigure = true; + + # has no tests + doCheck = false; + + pythonImportsCheck = [ + "PyQt5.QtChart" + ]; + + meta = with lib; { + description = "Python bindings for the Qt Charts library"; + homepage = "https://riverbankcomputing.com/"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ panicgh ]; + }; +} diff --git a/pkgs/development/python-modules/pyqtdatavisualization/default.nix b/pkgs/development/python-modules/pyqtdatavisualization/default.nix new file mode 100644 index 0000000000000..1561e9d4be51a --- /dev/null +++ b/pkgs/development/python-modules/pyqtdatavisualization/default.nix @@ -0,0 +1,77 @@ +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pyqt5 +, pyqt-builder +, python +, pythonOlder +, qtdatavis3d +, setuptools +, sip +}: + +buildPythonPackage rec { + pname = "pyqtdatavisualization"; + version = "5.15.5"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchPypi { + pname = "PyQtDataVisualization"; + inherit version; + hash = "sha256-iSf496pwhX7wDFHj379vg92fOFX0FuDVMVknYcu53H8="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "[tool.sip.project]" "[tool.sip.project]''\nsip-include-dirs = [\"${pyqt5}/${python.sitePackages}/PyQt5/bindings\"]" + ''; + + outputs = [ "out" "dev" ]; + + enableParallelBuilding = true; + # HACK: paralellize compilation of make calls within pyqt's setup.py + # pkgs/stdenv/generic/setup.sh doesn't set this for us because + # make gets called by python code and not its build phase + # format=pyproject means the pip-build-hook hook gets used to build this project + # pkgs/development/interpreters/python/hooks/pip-build-hook.sh + # does not use the enableParallelBuilding flag + preBuild = '' + export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}" + ''; + + dontWrapQtApps = true; + + nativeBuildInputs = [ + sip + qtdatavis3d + setuptools + pyqt-builder + ]; + + buildInputs = [ + qtdatavis3d + ]; + + propagatedBuildInputs = [ + pyqt5 + ]; + + dontConfigure = true; + + # has no tests + doCheck = false; + + pythonImportsCheck = [ + "PyQt5.QtDataVisualization" + ]; + + meta = with lib; { + description = "Python bindings for the Qt Data Visualization library"; + homepage = "https://riverbankcomputing.com/"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ panicgh ]; + }; +} |