Merge pull request #176272 from necessarily-equal/booklet-imposer

bookletimposer: add new package

authored by

Sandro and committed by
GitHub
22641846 e0c66dad

+85
+20
pkgs/applications/office/bookletimposer/configdir.patch
···
··· 1 + diff --git a/lib/bookletimposer/config.py b/lib/bookletimposer/config.py 2 + index 8f107a4..d4d335d 100644 3 + --- a/lib/bookletimposer/config.py 4 + +++ b/lib/bookletimposer/config.py 5 + @@ -45,14 +41,7 @@ def debug(msg): 6 + 7 + 8 + def get_sharedir(): 9 + - if debug_enabled and os.path.exists(os.path.join("/", "usr", "local", 10 + - "share", 11 + - "bookletimposer")): 12 + - return os.path.join("/", "usr", "local", "share") 13 + - elif os.path.exists(os.path.join("/", "usr", "share", "bookletimposer")): 14 + - return os.path.join("/", "usr", "share") 15 + - else: 16 + - return "" 17 + + return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", "share")) 18 + 19 + 20 + def get_datadir():
+44
pkgs/applications/office/bookletimposer/default.nix
···
··· 1 + { lib 2 + , fetchFromGitLab 3 + , python3 4 + , intltool 5 + , pandoc 6 + , gobject-introspection 7 + , wrapGAppsHook 8 + , gtk3 9 + }: 10 + 11 + python3.pkgs.buildPythonApplication rec { 12 + pname = "bookletimposer"; 13 + version = "0.3.1"; 14 + 15 + src = fetchFromGitLab { 16 + domain = "git.codecoop.org"; 17 + owner = "kjo"; 18 + repo = "bookletimposer"; 19 + rev = version; 20 + sha256 = "sha256-AEpvsFBJfyqLucC0l4AN/nA2+aYBR50BEgAcNDJBSqg="; 21 + }; 22 + 23 + patches = [ 24 + ./i18n.patch 25 + ./configdir.patch 26 + ]; 27 + 28 + nativeBuildInputs = [ intltool pandoc wrapGAppsHook ]; 29 + 30 + buildInputs = [ gobject-introspection ]; 31 + 32 + propagatedBuildInputs = [ 33 + gtk3 34 + (python3.withPackages (ps: with ps; [ distutils_extra pypdf2 pygobject3 ])) 35 + ]; 36 + 37 + meta = { 38 + homepage = "https://kjo.herbesfolles.org/bookletimposer/"; 39 + description = "A utility to achieve some basic imposition on PDF documents, especially designed to work on booklets"; 40 + platforms = lib.platforms.linux; 41 + license = "GPL-3.0-or-later"; 42 + maintainers = with lib.maintainers; [ afontain ]; 43 + }; 44 + }
+19
pkgs/applications/office/bookletimposer/i18n.patch
···
··· 1 + --- a/setup.cfg 2022-06-04 17:10:10.477581502 +0200 2 + +++ b/setup.cfg 2022-06-04 17:10:15.185594382 +0200 3 + @@ -1,6 +1,3 @@ 4 + [build] 5 + icons=False 6 + help=True 7 + - 8 + -[build_i18n] 9 + -domain=bookletimposer 10 + --- a/setup.py 2022-06-04 17:25:18.020872735 +0200 11 + +++ b/setup.py 2022-06-04 17:25:23.075884898 +0200 12 + @@ -115,7 +115,6 @@ It allows: 13 + requires = ['gtk', 'PyPDF2'], 14 + cmdclass = { "build" : build_extra.build_extra, 15 + "build_uiheaders" : build_uiheaders, 16 + - "build_i18n" : build_i18n.build_i18n, 17 + "build_help" : build_help.build_help, 18 + "build_icons" : build_icons.build_icons, 19 + "build_man" : build_man,
+2
pkgs/top-level/all-packages.nix
··· 25998 25999 bookworm = callPackage ../applications/office/bookworm { }; 26000 26001 boops = callPackage ../applications/audio/boops { }; 26002 26003 ChowCentaur = callPackage ../applications/audio/ChowCentaur { };
··· 25998 25999 bookworm = callPackage ../applications/office/bookworm { }; 26000 26001 + bookletimposer = callPackage ../applications/office/bookletimposer { }; 26002 + 26003 boops = callPackage ../applications/audio/boops { }; 26004 26005 ChowCentaur = callPackage ../applications/audio/ChowCentaur { };