From db93a29ef36e0177989e01da5eda102a723896b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 23 Nov 2021 02:46:04 +0100 Subject: [PATCH] cinnamon.xreader: init at 3.0.2 --- pkgs/desktops/cinnamon/default.nix | 1 + pkgs/desktops/cinnamon/xreader/default.nix | 76 ++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 pkgs/desktops/cinnamon/xreader/default.nix diff --git a/pkgs/desktops/cinnamon/default.nix b/pkgs/desktops/cinnamon/default.nix index 4d148fdcdb0b..2bbcddd2976f 100644 --- a/pkgs/desktops/cinnamon/default.nix +++ b/pkgs/desktops/cinnamon/default.nix @@ -32,5 +32,6 @@ lib.makeScope pkgs.newScope (self: with self; { muffin = callPackage ./muffin { }; xapps = callPackage ./xapps { }; warpinator = callPackage ./warpinator { }; + xreader = callPackage ./xreader { }; xviewer = callPackage ./xviewer { }; }) diff --git a/pkgs/desktops/cinnamon/xreader/default.nix b/pkgs/desktops/cinnamon/xreader/default.nix new file mode 100644 index 000000000000..39c7e11cbeb8 --- /dev/null +++ b/pkgs/desktops/cinnamon/xreader/default.nix @@ -0,0 +1,76 @@ +{ stdenv +, lib +, fetchFromGitHub +, glib +, gobject-introspection +, intltool +, shared-mime-info +, gtk3 +, wrapGAppsHook +, libxml2 +, xapps +, meson +, pkg-config +, cairo +, libsecret +, poppler +, libspectre +, libgxps +, webkitgtk +, nodePackages +, ninja +, gsettings-desktop-schemas +, djvulibre +, backends ? [ "pdf" "ps" /* "dvi" "t1lib" */ "djvu" "tiff" "pixbuf" "comics" "xps" "epub" ] +}: + +stdenv.mkDerivation rec { + pname = "xreader"; + version = "3.0.2"; + + src = fetchFromGitHub { + owner = "linuxmint"; + repo = pname; + rev = version; + sha256 = "vyZhKsuASbkc6IBtfbhTIHOQ0XYNFaCVua+jS4B5LWk="; + }; + + nativeBuildInputs = [ + shared-mime-info + wrapGAppsHook + meson + ninja + pkg-config + gobject-introspection + intltool + ]; + + mesonFlags = [ + "-Dmathjax-directory=${nodePackages.mathjax}" + "-Dc_args=-I${glib.dev}/include/gio-unix-2.0" + ] ++ (map (x: "-D${x}=true") backends); + + buildInputs = [ + glib + gtk3 + xapps + cairo + libxml2 + libsecret + poppler + libspectre + libgxps + webkitgtk + nodePackages.mathjax + djvulibre + ]; + + meta = with lib; { + description = "A document viewer capable of displaying multiple and single page +document formats like PDF and Postscript"; + homepage = "https://github.com/linuxmint/xreader"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = teams.cinnamon.members; + }; +}