pympress: 1.5.1 -> 1.6.3

This also makes the application ready to work on Darwin (but still not
working until #113777 is fixed).

Version 1.5.1 did not build on Darwin because libcanberra-gtk3 is
broken, and python-vlc is required but only works on Linux.

Version 1.6.x fixed the python-vlc requirement to make it optional, so
now both libcanberra-gtk3 and python-vlc inputs can be made optional,
and enabled by default on Linux. This means that on Darwin there is no
support for media, but it is still better than not having the
application at all.

Unfortunately, until watchdog 2.x is fixed, the Darwin build will be
still broken.

-----

The setup.py file now parses the setuptools version, so it needs to be
patched to fix an error with the 'post0' suffix in the version.

Also, setuptools is needed in propagatedBuildInputs to fix the
`ModuleNotFoundError: No module named 'pkg_resources'` error.

+18 -6
+18 -6
pkgs/applications/office/pympress/default.nix
··· 1 1 { lib 2 + , stdenv 3 + , fetchpatch 2 4 , python3Packages 3 5 , wrapGAppsHook 4 6 , gtk3 5 7 , gobject-introspection 6 8 , libcanberra-gtk3 7 9 , poppler_gi 10 + , withGstreamer ? stdenv.isLinux 11 + , withVLC ? stdenv.isLinux 8 12 }: 9 13 10 14 python3Packages.buildPythonApplication rec { 11 15 pname = "pympress"; 12 - version = "1.5.1"; 16 + version = "1.6.3"; 13 17 14 18 src = python3Packages.fetchPypi { 15 19 inherit pname version; 16 - sha256 = "173d9scf2z29qg279jf33zcl7sgc3wp662fgpm943bn9667q18wf"; 20 + sha256 = "sha256-f+OjE0x/3yfJYHCLB+on7TT7MJ2vNu87SHRi67qFDCM="; 17 21 }; 18 22 23 + patches = [ 24 + # Should not be needed once v1.6.4 is released 25 + (fetchpatch { 26 + name = "fix-setuptools-version-parsing.patch"; 27 + url = "https://github.com/Cimbali/pympress/commit/474514d71396ac065e210fd846e07ed1139602d0.diff"; 28 + sha256 = "sha256-eiw54sjMrXrNrhtkAXxiSTatzoA0NDA03L+HpTDax58="; 29 + }) 30 + ]; 31 + 19 32 nativeBuildInputs = [ 20 33 wrapGAppsHook 21 34 ]; ··· 23 36 buildInputs = [ 24 37 gtk3 25 38 gobject-introspection 26 - libcanberra-gtk3 27 39 poppler_gi 28 - ]; 40 + ] ++ lib.optional withGstreamer libcanberra-gtk3; 29 41 30 42 propagatedBuildInputs = with python3Packages; [ 31 43 pycairo 32 44 pygobject3 33 - python-vlc 45 + setuptools 34 46 watchdog 35 - ]; 47 + ] ++ lib.optional withVLC python-vlc; 36 48 37 49 doCheck = false; # there are no tests 38 50