;;; GNU Guix --- Functional package management for GNU ;;; ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2016 ng0 ;;; Copyright © 2017 2018 Marius Bakke ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2018 2019 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Raghav Gururajan ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages pwmt) #:use-module (gnu packages) #:use-module (gnu packages backup) #:use-module (gnu packages check) #:use-module (gnu packages djvu) #:use-module (gnu packages documentation) #:use-module (gnu packages file) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages image) #:use-module (gnu packages javascript) #:use-module (gnu packages linux) #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages sphinx) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) #:use-module (gnu packages web) #:use-module (gnu packages xorg) #:use-module (gnu packages xdisorg) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system meson)) (define-public girara (package (name "girara") (version "0.3.4") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/girara/download/girara-" version ".tar.xz")) (sha256 (base32 "0cmjdismdsx9a5l7zx54zkd33mgg3mx4ckpvc7aap3x6a1ddmz2i")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t ; To compile schemas #:configure-flags (list "-Dnotify=enabled") ; For notification support #:phases (modify-phases %standard-phases (add-before 'check 'start-xserver ;; Tests require a running X server. (lambda* (#:key inputs #:allow-other-keys) (let ((xorg-server (assoc-ref inputs "xorg-server")) (display ":1")) (setenv "DISPLAY" display) ;; On busy machines, tests may take longer than ;; the default of four seconds. (setenv "CK_DEFAULT_TIMEOUT" "20") ;; Don't fail due to missing '/etc/machine-id'. (setenv "DBUS_FATAL_WARNINGS" "0") (zero? (system (string-append xorg-server "/bin/Xvfb " display " &"))))))))) (native-inputs `(("check" ,check) ; For tests ("doxygen" ,doxygen) ; For docs ("gettext" ,gettext-minimal) ("glib:bin" ,glib "bin") ("pkg-config" ,pkg-config) ("xorg-server" ,xorg-server-for-tests))) ; For tests (inputs `(("glib" ,glib) ("gtk+" ,gtk+) ("json-c" ,json-c) ; For configuration dumping support ("libnotify" ,libnotify) ; For notification support ("pango" ,pango))) (home-page "https://pwmt.org/projects/girara/") (synopsis "Library for minimalistic gtk+3 user interfaces") (description "Girara is a library that implements a user interface that focuses on simplicity and minimalism. Currently based on GTK+, a cross-platform widget toolkit, it provides an interface that focuses on three main components: a so-called view widget that represents the actual application, an input bar that is used to execute commands of the application and the status bar which provides the user with current information.") (license license:zlib))) (define-public zathura (package (name "zathura") (version "0.4.5") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/zathura/download/zathura-" version ".tar.xz")) (sha256 (base32 "0b3nrcvykkpv2vm99kijnic2gpfzva520bsjlihaxandzfm9ff8c")))) (build-system meson-build-system) (arguments `(#:glib-or-gtk? #t ; To compile schemas #:phases (modify-phases %standard-phases (add-before 'check 'start-xserver ;; Tests require a running X server. (lambda* (#:key inputs #:allow-other-keys) (let ((xorg-server (assoc-ref inputs "xorg-server")) (display ":1")) (setenv "DISPLAY" display) ;; On busy machines, tests may take longer than ;; the default of four seconds. (setenv "CK_DEFAULT_TIMEOUT" "20") ;; Don't fail due to missing '/etc/machine-id'. (setenv "DBUS_FATAL_WARNINGS" "0") (zero? (system (string-append xorg-server "/bin/Xvfb " display " &"))))))))) (native-inputs `(("check" ,check) ; For tests ("desktop-file-utils" ,desktop-file-utils) ("doxygen" ,doxygen) ; For docs ("gettext" ,gettext-minimal) ("glib:bin" ,glib "bin") ("librsvg" ,librsvg) ; For icons ("pkg-config" ,pkg-config) ("python-breathe" ,python-breathe) ; For docs ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) ; For docs ("python-sphinx" ,python-sphinx) ; For docs ("xorg-server" ,xorg-server-for-tests))) ; For tests (inputs `(("appstream-glib" ,appstream-glib) ("cairo" ,cairo) ("file" ,file) ; For mime-type detection ("girara" ,girara) ("glib" ,glib) ("json-c" ,json-c) ; For configuration dumping support ("gtk+" ,gtk+) ("libnotify" ,libnotify) ; For notification support ("libseccomp" ,libseccomp) ; For sandbox support ("sqlite" ,sqlite))) ; For database backend (native-search-paths (list (search-path-specification (variable "ZATHURA_PLUGINS_PATH") (files '("lib/zathura"))))) (synopsis "Document Viewer") (description "Zathura is a highly customizable and functional document viewer based on the girara user interface library and several document libraries. It currently supports multiple back-ends (PostScript, PDF, EPUB, DjVu and ComicBook) via plugins.") (home-page "https://pwmt.org/projects/zathura/") (license license:zlib))) (define-public zathura-ps (package (name "zathura-ps") (version "0.2.6") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/zathura-ps/download/" "zathura-ps-" version ".tar.xz")) (sha256 (base32 "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y")))) (build-system meson-build-system) (arguments `(#:tests? #f ; No target #:glib-or-gtk? #t ; To compile schemas #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-plugin-directory ;; This package tries to install into directory of Zathura. ;; That cannot be allowed. Fix it. (lambda* (#:key outputs #:allow-other-keys) (substitute* "meson.build" (("(install_dir:).*" _ key) (string-append key "'" (assoc-ref outputs "out") "/lib/zathura'\n"))) #t))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("cairo" ,cairo) ("girara" ,girara) ("glib" ,glib) ("gtk+" ,gtk+) ("json-c" ,json-c) ; To generate cargs for zathura ("libnotify" ,libnotify) ; To generate cargs for zathura ("libspectre" ,libspectre) ("zathura" ,zathura))) (synopsis "PostScript support for zathura") (description "The zathura-ps plugin adds PostScript support to zathura by using the libspectre library.") (home-page "https://pwmt.org/projects/zathura-ps/") (license license:zlib))) (define-public zathura-pdf-poppler (package (name "zathura-pdf-poppler") (version "0.3.0") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/" "zathura-pdf-poppler-" version ".tar.xz")) (sha256 (base32 "1vfl4vkyy3rf39r1sqaa7y8113bgkh2bkfq3nn2inis9mrykmk6m")))) (build-system meson-build-system) (arguments `(#:tests? #f ; No target #:glib-or-gtk? #t ; To compile schemas #:configure-flags (list (string-append "-Dplugindir=" (assoc-ref %outputs "out") "/lib/zathura")))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("cairo" ,cairo) ("girara" ,girara) ("glib" ,glib) ("poppler" ,poppler) ("zathura" ,zathura))) (synopsis "PDF support (poppler backend) for zathura") (description "The zathura-pdf-poppler plugin adds PDF support to zathura by using the poppler rendering library.") (home-page "https://pwmt.org/projects/zathura-pdf-poppler/") (license license:zlib))) (define-public zathura-pdf-mupdf (package (name "zathura-pdf-mupdf") (version "0.3.5") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/zathura-pdf-mupdf/download/" "zathura-pdf-mupdf-" version ".tar.xz")) (sha256 (base32 "1pjwsb7zwclxsvz229fl7y2saf1pv3ifwv3ay8viqxgrp9x3z9hq")))) (build-system meson-build-system) (arguments `(#:tests? #f ; No target #:glib-or-gtk? #t ; To compile schemas #:configure-flags (list (string-append "-Dplugindir=" (assoc-ref %outputs "out") "/lib/zathura") "-Dlink-external=true") ; For MuPDF external libraries #:phases (modify-phases %standard-phases (add-before 'configure 'add-mujs-to-dependencies (lambda _ ;; Add mujs to the 'build_dependencies'. (substitute* "meson.build" (("^ libopenjp2 = dependency.*" x) (string-append x " mujs = cc.find_library('mujs')\n")) (("^ libopenjp2") " libopenjp2, mujs"))))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("cairo" ,cairo) ("girara" ,girara) ("glib" ,glib) ("gtk+" ,gtk+) ("jbig2dec" ,jbig2dec) ("json-c" ,json-c) ; To generate cargs for zathura ("libjpeg" ,libjpeg) ("libnotify" ,libnotify) ; To generate cargs for zathura ("mujs" ,mujs) ("mupdf" ,mupdf) ("openjpeg" ,openjpeg) ("zathura" ,zathura))) (synopsis "PDF support (mupdf backend) for zathura") (description "The zathura-pdf-mupdf plugin adds PDF support to zathura by using the mupdf rendering library.") (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/") (license license:zlib))) (define-public zathura-djvu (package (name "zathura-djvu") (version "0.2.9") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/zathura-djvu/download/" "zathura-djvu-" version ".tar.xz")) (sha256 (base32 "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln")))) (build-system meson-build-system) (arguments `(#:tests? #f ; No target #:glib-or-gtk? #t ; To compile schemas #:configure-flags (list (string-append "-Dplugindir=" (assoc-ref %outputs "out") "/lib/zathura")))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("cairo" ,cairo) ("djvulibre" ,djvulibre) ("girara" ,girara) ("glib" ,glib) ("gtk+" ,gtk+) ("json-c" ,json-c) ; To generate cargs for zathura ("libnotify" ,libnotify) ; To generate cargs for zathura ("zathura" ,zathura))) (synopsis "DjVu support for zathura") (description "The zathura-djvu plugin adds DjVu support to zathura using the DjVu library.") (home-page "https://pwmt.org/projects/zathura-djvu/") (license license:zlib))) (define-public zathura-cb (package (name "zathura-cb") (version "0.1.8") (source (origin (method url-fetch) (uri (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-" version ".tar.xz")) (sha256 (base32 "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5")))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("libarchive" ,libarchive) ("zathura" ,zathura))) (build-system meson-build-system) (arguments `(#:tests? #f ; package does not contain tests #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-plugin-directory ;; Something of a regression in 0.1.8: the new Meson build system ;; now hard-codes an incorrect plugin directory. Fix it. (lambda* (#:key outputs #:allow-other-keys) (substitute* "meson.build" (("(install_dir:).*" _ key) (string-append key "'" (assoc-ref outputs "out") "/lib/zathura'\n"))) #t))))) (home-page "https://pwmt.org/projects/zathura-cb/") (synopsis "Comic book support for zathura (libarchive backend)") (description "The zathura-cb plugin adds comic book support to zathura using libarchive.") (license license:zlib)))