Merge pull request #255734 from symphorien/paperwork-2.2

paperwork: 2.1.2 -> 2.2.1

authored by

Guillaume Girol and committed by
GitHub
8b37bb12 f85a3c6a

+57 -32
+2
nixos/doc/manual/release-notes/rl-2311.section.md
··· 363 363 364 364 - `services.outline` can now be configured to use local filesystem storage instead of S3 storage using [services.outline.storage.storageType](#opt-services.outline.storage.storageType). 365 365 366 + - `paperwork` was updated to version 2.2. Documents scanned with this version will not be visible to previous versions if you downgrade. See the [upstream announcement](https://forum.openpaper.work/t/paperwork-2-2-testing-phase/316#important-switch-from-jpeg-to-png-for-new-pages-2) for details and workarounds. 367 + 366 368 - `buildGoModule` `go-modules` attrs have been renamed to `goModules`. 367 369 368 370 - The `fonts.fonts` and `fonts.enableDefaultFonts` options have been renamed to `fonts.packages` and `fonts.enableDefaultPackages` respectively.
+23 -5
pkgs/applications/office/paperwork/openpaperwork-core.nix
··· 1 - { buildPythonPackage, lib, fetchFromGitLab 1 + { buildPythonPackage 2 + , lib 3 + , fetchFromGitLab 2 4 3 - , isPy3k, isPyPy 5 + , isPy3k 6 + , isPyPy 4 7 5 - , distro, setuptools, psutil 8 + , distro 9 + , setuptools 10 + , psutil 11 + , certifi 12 + , setuptools-scm 6 13 7 14 , pkgs 8 15 }: ··· 10 17 buildPythonPackage rec { 11 18 pname = "openpaperwork-core"; 12 19 inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; 20 + format = "pyproject"; 13 21 14 22 sourceRoot = "${src.name}/openpaperwork-core"; 15 23 ··· 17 25 disabled = !isPy3k && !isPyPy; 18 26 19 27 patchPhase = '' 20 - echo 'version = "${version}"' > src/openpaperwork_core/_version.py 21 28 chmod a+w -R .. 22 29 patchShebangs ../tools 23 30 ''; 24 31 32 + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 33 + 25 34 propagatedBuildInputs = [ 26 35 distro 27 36 setuptools 28 37 psutil 38 + certifi 29 39 ]; 30 40 31 - nativeBuildInputs = [ pkgs.gettext pkgs.which ]; 41 + nativeBuildInputs = [ 42 + pkgs.gettext 43 + pkgs.which 44 + setuptools-scm 45 + ]; 32 46 33 47 preBuild = '' 34 48 make l10n_compile 49 + ''; 50 + 51 + preCheck = '' 52 + export HOME=$(mktemp -d) 35 53 ''; 36 54 37 55 meta = {
+10 -2
pkgs/applications/office/paperwork/openpaperwork-gtk.nix
··· 9 9 , pillow 10 10 , pygobject3 11 11 , distro 12 + , setuptools-scm 12 13 13 14 , pkgs 14 15 }: ··· 16 17 buildPythonPackage rec { 17 18 pname = "openpaperwork-gtk"; 18 19 inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; 20 + format = "pyproject"; 19 21 20 22 sourceRoot = "${src.name}/openpaperwork-gtk"; 21 23 ··· 23 25 disabled = !isPy3k && !isPyPy; 24 26 25 27 patchPhase = '' 26 - echo 'version = "${version}"' > src/openpaperwork_gtk/_version.py 27 28 chmod a+w -R .. 28 29 patchShebangs ../tools 29 30 ''; 30 31 31 - nativeBuildInputs = [ pkgs.gettext pkgs.which ]; 32 + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 33 + 34 + nativeBuildInputs = [ 35 + pkgs.gettext 36 + pkgs.which 37 + setuptools-scm 38 + ]; 39 + 32 40 preBuild = '' 33 41 make l10n_compile 34 42 '';
+5 -11
pkgs/applications/office/paperwork/paperwork-backend.nix
··· 1 1 { buildPythonPackage 2 2 , lib 3 - , fetchpatch 4 3 , fetchFromGitLab 5 4 , pyenchant 6 5 , scikit-learn ··· 8 7 , pycountry 9 8 , whoosh 10 9 , termcolor 11 - , levenshtein 12 10 , pygobject3 13 11 , pyocr 14 12 , natsort ··· 24 22 , shared-mime-info 25 23 , libreoffice 26 24 , unittestCheckHook 25 + , setuptools-scm 27 26 }: 28 27 29 28 buildPythonPackage rec { 30 29 pname = "paperwork-backend"; 31 30 inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; 31 + format = "pyproject"; 32 32 33 33 sourceRoot = "${src.name}/paperwork-backend"; 34 34 35 35 patches = [ 36 36 # disables a flaky test https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/1035#note_1493700 37 37 ./flaky_test.patch 38 - (fetchpatch { 39 - url = "https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/commit/0f5cf0fe7ef223000e02c28e4c7576f74a778fe6.patch"; 40 - hash = "sha256-NIK3j2TdydfeK3/udS/Pc+tJa/pPkfAmSPPeaYuaCq4="; 41 - }) 42 38 ]; 43 39 44 40 patchFlags = [ "-p2" ]; 45 41 46 42 postPatch = '' 47 - substituteInPlace setup.py \ 48 - --replace python-Levenshtein Levenshtein 49 - 50 - echo 'version = "${version}"' > src/paperwork_backend/_version.py 51 43 chmod a+w -R .. 52 44 patchShebangs ../tools 53 45 ''; 54 46 47 + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 48 + 55 49 propagatedBuildInputs = [ 56 50 distro 57 51 gtk3 ··· 63 57 pygobject3 64 58 pyocr 65 59 pypillowfight 66 - levenshtein 67 60 poppler_gi 68 61 scikit-learn 69 62 termcolor ··· 74 67 gettext 75 68 shared-mime-info 76 69 which 70 + setuptools-scm 77 71 ]; 78 72 79 73 preBuild = ''
+4 -10
pkgs/applications/office/paperwork/paperwork-gtk.nix
··· 34 34 python3Packages.buildPythonApplication rec { 35 35 inherit src version; 36 36 pname = "paperwork"; 37 + format = "pyproject"; 37 38 38 39 sample_docs = sample_documents // { 39 40 # a trick for the update script ··· 43 44 44 45 sourceRoot = "${src.name}/paperwork-gtk"; 45 46 46 - # Patch out a few paths that assume that we're using the FHS: 47 - postPatch = '' 48 - substituteInPlace setup.py \ 49 - --replace python-Levenshtein Levenshtein 47 + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 50 48 49 + postPatch = '' 51 50 chmod a+w -R .. 52 51 patchShebangs ../tools 53 52 54 53 export HOME=$(mktemp -d) 55 - 56 - cat - ../AUTHORS.py > src/paperwork_gtk/_version.py <<EOF 57 - # -*- coding: utf-8 -*- 58 - version = "${version}" 59 - authors_code="" 60 - EOF 61 54 ''; 62 55 63 56 preBuild = '' ··· 93 86 nativeBuildInputs = [ 94 87 wrapGAppsHook 95 88 gobject-introspection 89 + python3Packages.setuptools-scm 96 90 (lib.getBin gettext) 97 91 which 98 92 gdk-pixbuf # for the setup hook
+11 -2
pkgs/applications/office/paperwork/paperwork-shell.nix
··· 9 9 , openpaperwork-gtk 10 10 , paperwork-backend 11 11 , fabulous 12 + , rich 12 13 , getkey 13 14 , psutil 14 15 , shared-mime-info 16 + , setuptools-scm 15 17 16 18 , pkgs 17 19 }: ··· 19 21 buildPythonPackage rec { 20 22 pname = "paperwork-shell"; 21 23 inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; 24 + format = "pyproject"; 22 25 23 26 sourceRoot = "${src.name}/paperwork-shell"; 24 27 ··· 26 29 disabled = !isPy3k && !isPyPy; 27 30 28 31 patchPhase = '' 29 - echo 'version = "${version}"' > src/paperwork_shell/_version.py 30 32 chmod a+w -R .. 31 33 patchShebangs ../tools 32 34 ''; 35 + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 33 36 34 37 propagatedBuildInputs = [ 35 38 openpaperwork-core ··· 37 40 fabulous 38 41 getkey 39 42 psutil 43 + rich 40 44 ]; 41 45 42 46 nativeCheckInputs = [ ··· 44 48 openpaperwork-gtk 45 49 ]; 46 50 47 - nativeBuildInputs = [ pkgs.gettext pkgs.which ]; 51 + nativeBuildInputs = [ 52 + pkgs.gettext 53 + pkgs.which 54 + setuptools-scm 55 + ]; 56 + 48 57 preBuild = '' 49 58 make l10n_compile 50 59 '';
+2 -2
pkgs/applications/office/paperwork/src.nix
··· 1 1 {fetchFromGitLab}: 2 2 rec { 3 - version = "2.1.2"; 3 + version = "2.2.1"; 4 4 src = fetchFromGitLab { 5 5 domain = "gitlab.gnome.org"; 6 6 repo = "paperwork"; 7 7 group = "World"; 8 8 owner = "OpenPaperwork"; 9 9 rev = version; 10 - sha256 = "/5k+zUtTE+Dr879xbHDCAYrqlEJLsbkcRSG3GbA/PCg="; 10 + sha256 = "sha256-OFVj9INDiOpGd5N3ziMBWt3/IdmpInc+jEAxW3GcvOA="; 11 11 }; 12 12 sample_documents = fetchFromGitLab { 13 13 domain = "gitlab.gnome.org";