diff --git a/pkgs/applications/office/paperwork/openpaperwork-core.nix b/pkgs/applications/office/paperwork/openpaperwork-core.nix index 01317f647589d9..44672bcf4cf455 100644 --- a/pkgs/applications/office/paperwork/openpaperwork-core.nix +++ b/pkgs/applications/office/paperwork/openpaperwork-core.nix @@ -1,7 +1,7 @@ { buildPythonPackage, lib, - fetchFromGitLab, + callPackage, isPy3k, isPyPy, @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "openpaperwork-core"; - inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; + inherit (callPackage ./src.nix { }) version src; format = "pyproject"; sourceRoot = "${src.name}/openpaperwork-core"; diff --git a/pkgs/applications/office/paperwork/openpaperwork-gtk.nix b/pkgs/applications/office/paperwork/openpaperwork-gtk.nix index 2e88ee23bfe59a..a2bbb74abd315c 100644 --- a/pkgs/applications/office/paperwork/openpaperwork-gtk.nix +++ b/pkgs/applications/office/paperwork/openpaperwork-gtk.nix @@ -1,7 +1,7 @@ { buildPythonPackage, lib, - fetchFromGitLab, + callPackage, isPy3k, isPyPy, @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "openpaperwork-gtk"; - inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; + inherit (callPackage ./src.nix { }) version src; format = "pyproject"; sourceRoot = "${src.name}/openpaperwork-gtk"; diff --git a/pkgs/applications/office/paperwork/paperwork-backend.nix b/pkgs/applications/office/paperwork/paperwork-backend.nix index 0d0cee9f69fc9a..da40d64aff0cbd 100644 --- a/pkgs/applications/office/paperwork/paperwork-backend.nix +++ b/pkgs/applications/office/paperwork/paperwork-backend.nix @@ -1,7 +1,7 @@ { buildPythonPackage, lib, - fetchFromGitLab, + callPackage, pyenchant, scikit-learn, pypillowfight, @@ -28,7 +28,7 @@ buildPythonPackage rec { pname = "paperwork-backend"; - inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; + inherit (callPackage ./src.nix { }) version src; format = "pyproject"; sourceRoot = "${src.name}/paperwork-backend"; diff --git a/pkgs/applications/office/paperwork/paperwork-gtk.nix b/pkgs/applications/office/paperwork/paperwork-gtk.nix index 3f8876779d830b..0ff7a13e031f77 100644 --- a/pkgs/applications/office/paperwork/paperwork-gtk.nix +++ b/pkgs/applications/office/paperwork/paperwork-gtk.nix @@ -1,5 +1,6 @@ { lib, + callPackage, python3Packages, gtk3, cairo, @@ -9,7 +10,6 @@ dbus, libnotify, wrapGAppsHook3, - fetchFromGitLab, which, gettext, gobject-introspection, @@ -32,7 +32,7 @@ let imagemagick perlPackages.Po4a ]; - inherit (import ./src.nix { inherit fetchFromGitLab; }) version src sample_documents; + inherit (callPackage ./src.nix { }) version src sample_documents; in python3Packages.buildPythonApplication rec { diff --git a/pkgs/applications/office/paperwork/paperwork-shell.nix b/pkgs/applications/office/paperwork/paperwork-shell.nix index 21e3976a9adaa3..787c7193ef9fc4 100644 --- a/pkgs/applications/office/paperwork/paperwork-shell.nix +++ b/pkgs/applications/office/paperwork/paperwork-shell.nix @@ -1,7 +1,7 @@ { buildPythonPackage, lib, - fetchFromGitLab, + callPackage, isPy3k, isPyPy, @@ -21,7 +21,7 @@ buildPythonPackage rec { pname = "paperwork-shell"; - inherit (import ./src.nix { inherit fetchFromGitLab; }) version src; + inherit (callPackage ./src.nix { }) version src; format = "pyproject"; sourceRoot = "${src.name}/paperwork-shell"; diff --git a/pkgs/applications/office/paperwork/src.nix b/pkgs/applications/office/paperwork/src.nix index 5f83eddd3fb795..b8f4f158b1c253 100644 --- a/pkgs/applications/office/paperwork/src.nix +++ b/pkgs/applications/office/paperwork/src.nix @@ -1,14 +1,40 @@ -{ fetchFromGitLab }: +{ + fetchFromGitLab, + stdenv, + fetchpatch, +}: rec { version = "2.2.5"; - src = fetchFromGitLab { - domain = "gitlab.gnome.org"; - repo = "paperwork"; - group = "World"; - owner = "OpenPaperwork"; - rev = version; - sha256 = "sha256-PRh0ohmPLwpM76qYfbExFqq4OK6Hm0fbdzrjXungSoY="; - }; + src = + let + actual_src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + repo = "paperwork"; + group = "World"; + owner = "OpenPaperwork"; + rev = version; + sha256 = "sha256-PRh0ohmPLwpM76qYfbExFqq4OK6Hm0fbdzrjXungSoY="; + }; + in + stdenv.mkDerivation { + pname = "paperwork-patched-src"; + inherit version; + src = actual_src; + + patches = [ + # fix installing translations + # remove on next release + (fetchpatch { + url = "https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/commit/b8e2633ace0f3d9d57e68c27db8f594b8a5ddd7e.patch"; + hash = "sha256-VUT86kF0ZHLGK457ZrrIBMeiZqg/rPRpbkBA/ua9rU8="; + }) + ]; + + installPhase = '' + cp -r . $out + ''; + }; + sample_documents = fetchFromGitLab { domain = "gitlab.gnome.org"; repo = "paperwork-test-documents";