about summary refs log tree commit diff
path: root/pkgs/applications/misc/zathura
diff options
context:
space:
mode:
authorLord-Valen <lord_valen@protonmail.com>2024-05-26 14:02:58 -0400
committerLord-Valen <lord_valen@protonmail.com>2024-05-26 14:02:58 -0400
commit61167e9c2a42b05b508dec15f27e0d100e01326d (patch)
treeefa7db1fc56e8ee26b328bbd229519736e889697 /pkgs/applications/misc/zathura
parent5439ec8bd13937e3964ca663b5b30decd32bc876 (diff)
zathuraPkgs: run nixfmt-rfc-style
Diffstat (limited to 'pkgs/applications/misc/zathura')
-rw-r--r--pkgs/applications/misc/zathura/cb/default.nix29
-rw-r--r--pkgs/applications/misc/zathura/core/default.nix63
-rw-r--r--pkgs/applications/misc/zathura/default.nix13
-rw-r--r--pkgs/applications/misc/zathura/djvu/default.nix29
-rw-r--r--pkgs/applications/misc/zathura/pdf-mupdf/default.nix46
-rw-r--r--pkgs/applications/misc/zathura/pdf-poppler/default.nix24
-rw-r--r--pkgs/applications/misc/zathura/ps/default.nix29
-rw-r--r--pkgs/applications/misc/zathura/wrapper.nix52
8 files changed, 216 insertions, 69 deletions
diff --git a/pkgs/applications/misc/zathura/cb/default.nix b/pkgs/applications/misc/zathura/cb/default.nix
index ea2c74fda3701..84ddd0e70ba85 100644
--- a/pkgs/applications/misc/zathura/cb/default.nix
+++ b/pkgs/applications/misc/zathura/cb/default.nix
@@ -1,5 +1,15 @@
-{ stdenv, lib, fetchurl, meson, ninja, pkg-config, zathura_core
-, girara, gettext, libarchive }:
+{
+  stdenv,
+  lib,
+  fetchurl,
+  meson,
+  ninja,
+  pkg-config,
+  zathura_core,
+  girara,
+  gettext,
+  libarchive,
+}:
 
 stdenv.mkDerivation rec {
   pname = "zathura-cb";
@@ -10,8 +20,17 @@ stdenv.mkDerivation rec {
     sha256 = "1j5v32f9ki35v1jc7a067anhlgqplzrp4fqvznlixfhcm0bwmc49";
   };
 
-  nativeBuildInputs = [ meson ninja pkg-config gettext ];
-  buildInputs = [ libarchive zathura_core girara ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+  ];
+  buildInputs = [
+    libarchive
+    zathura_core
+    girara
+  ];
 
   PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
 
@@ -20,7 +39,7 @@ stdenv.mkDerivation rec {
     description = "A zathura CB plugin";
     longDescription = ''
       The zathura-cb plugin adds comic book support to zathura.
-      '';
+    '';
     license = licenses.zlib;
     platforms = platforms.unix;
     maintainers = with maintainers; [ jlesquembre ];
diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index 8b452c7f1a40c..8dd529c6b6cc0 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -1,9 +1,29 @@
-{ lib, stdenv, fetchFromGitLab, meson, ninja, wrapGAppsHook3, pkg-config, gitUpdater
-, appstream-glib, json-glib, desktop-file-utils, python3
-, gtk, girara, gettext, libxml2, check
-, sqlite, glib, texlive, libintl, libseccomp
-, file, librsvg
-, gtk-mac-integration
+{
+  lib,
+  stdenv,
+  fetchFromGitLab,
+  meson,
+  ninja,
+  wrapGAppsHook3,
+  pkg-config,
+  gitUpdater,
+  appstream-glib,
+  json-glib,
+  desktop-file-utils,
+  python3,
+  gtk,
+  girara,
+  gettext,
+  libxml2,
+  check,
+  sqlite,
+  glib,
+  texlive,
+  libintl,
+  libseccomp,
+  file,
+  librsvg,
+  gtk-mac-integration,
 }:
 
 stdenv.mkDerivation (finalAttrs: {
@@ -18,7 +38,12 @@ stdenv.mkDerivation (finalAttrs: {
     hash = "sha256-mHEYqgBB55p8nykFtvYtP5bWexp/IqFbeLs7gZmXCeE=";
   };
 
-  outputs = [ "bin" "man" "dev" "out" ];
+  outputs = [
+    "bin"
+    "man"
+    "dev"
+    "out"
+  ];
 
   # Flag list:
   # https://github.com/pwmt/zathura/blob/master/meson_options.txt
@@ -33,15 +58,29 @@ stdenv.mkDerivation (finalAttrs: {
   ];
 
   nativeBuildInputs = [
-    meson ninja pkg-config desktop-file-utils python3.pythonOnBuildForHost.pkgs.sphinx
-    gettext wrapGAppsHook3 libxml2 appstream-glib
+    meson
+    ninja
+    pkg-config
+    desktop-file-utils
+    python3.pythonOnBuildForHost.pkgs.sphinx
+    gettext
+    wrapGAppsHook3
+    libxml2
+    appstream-glib
   ];
 
   buildInputs = [
-    gtk girara libintl sqlite glib file librsvg check json-glib
+    gtk
+    girara
+    libintl
+    sqlite
+    glib
+    file
+    librsvg
+    check
+    json-glib
     texlive.bin.core
-  ] ++ lib.optional stdenv.isLinux libseccomp
-    ++ lib.optional stdenv.isDarwin gtk-mac-integration;
+  ] ++ lib.optional stdenv.isLinux libseccomp ++ lib.optional stdenv.isDarwin gtk-mac-integration;
 
   doCheck = !stdenv.isDarwin;
 
diff --git a/pkgs/applications/misc/zathura/default.nix b/pkgs/applications/misc/zathura/default.nix
index 67fe3032d05ce..23b5ce0198e19 100644
--- a/pkgs/applications/misc/zathura/default.nix
+++ b/pkgs/applications/misc/zathura/default.nix
@@ -1,6 +1,9 @@
-{ config, pkgs
-# zathura_pdf_mupdf fails to load _opj_create_decompress at runtime on Darwin (https://github.com/NixOS/nixpkgs/pull/61295#issue-277982980)
-, useMupdf ? config.zathura.useMupdf or (!pkgs.stdenv.isDarwin) }:
+{
+  config,
+  pkgs,
+  # zathura_pdf_mupdf fails to load _opj_create_decompress at runtime on Darwin (https://github.com/NixOS/nixpkgs/pull/61295#issue-277982980)
+  useMupdf ? config.zathura.useMupdf or (!pkgs.stdenv.isDarwin),
+}:
 
 let
   callPackage = pkgs.newScope self;
@@ -29,5 +32,5 @@ let
       ];
     };
   };
-
-in self
+in
+self
diff --git a/pkgs/applications/misc/zathura/djvu/default.nix b/pkgs/applications/misc/zathura/djvu/default.nix
index f0fe09486324d..b4ce653770e31 100644
--- a/pkgs/applications/misc/zathura/djvu/default.nix
+++ b/pkgs/applications/misc/zathura/djvu/default.nix
@@ -1,4 +1,16 @@
-{ lib, stdenv, fetchurl, meson, ninja, pkg-config, gtk, zathura_core, girara, djvulibre, gettext }:
+{
+  lib,
+  stdenv,
+  fetchurl,
+  meson,
+  ninja,
+  pkg-config,
+  gtk,
+  zathura_core,
+  girara,
+  djvulibre,
+  gettext,
+}:
 
 stdenv.mkDerivation rec {
   pname = "zathura-djvu";
@@ -9,8 +21,18 @@ stdenv.mkDerivation rec {
     sha256 = "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln";
   };
 
-  nativeBuildInputs = [ meson ninja pkg-config ];
-  buildInputs = [ djvulibre gettext zathura_core gtk girara ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
+  buildInputs = [
+    djvulibre
+    gettext
+    zathura_core
+    gtk
+    girara
+  ];
 
   PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
 
@@ -26,4 +48,3 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ ];
   };
 }
-
diff --git a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
index f6eb5cfd45e1a..f3810c4b7c26c 100644
--- a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
+++ b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix
@@ -1,17 +1,23 @@
-{ stdenv, lib, meson, ninja, fetchurl, cairo
-, girara
-, gtk-mac-integration
-, gumbo
-, jbig2dec
-, libjpeg
-, mupdf
-, openjpeg
-, pkg-config
-, zathura_core
-, tesseract
-, leptonica
-, mujs
-, gitUpdater
+{
+  stdenv,
+  lib,
+  meson,
+  ninja,
+  fetchurl,
+  cairo,
+  girara,
+  gtk-mac-integration,
+  gumbo,
+  jbig2dec,
+  libjpeg,
+  mupdf,
+  openjpeg,
+  pkg-config,
+  zathura_core,
+  tesseract,
+  leptonica,
+  mujs,
+  gitUpdater,
 }:
 
 stdenv.mkDerivation rec {
@@ -23,7 +29,11 @@ stdenv.mkDerivation rec {
     hash = "sha256-+YKgHWUj+iVmk4EYTAamJe2/15YcvbBxHcz9ucQCrC8=";
   };
 
-  nativeBuildInputs = [ meson ninja pkg-config ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+  ];
 
   buildInputs = [
     cairo
@@ -39,15 +49,13 @@ stdenv.mkDerivation rec {
     mujs
   ] ++ lib.optional stdenv.isDarwin gtk-mac-integration;
 
-  PKG_CONFIG_ZATHURA_PLUGINDIR= "lib/zathura";
+  PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
 
   postPatch = ''
     sed -i -e '/^mupdfthird =/d' -e 's/, mupdfthird//g' meson.build
   '';
 
-  passthru.updateScript = gitUpdater {
-    url = "https://git.pwmt.org/pwmt/zathura-pdf-mupdf.git";
-  };
+  passthru.updateScript = gitUpdater { url = "https://git.pwmt.org/pwmt/zathura-pdf-mupdf.git"; };
 
   meta = with lib; {
     homepage = "https://pwmt.org/projects/zathura-pdf-mupdf/";
diff --git a/pkgs/applications/misc/zathura/pdf-poppler/default.nix b/pkgs/applications/misc/zathura/pdf-poppler/default.nix
index 5246705bbd8b1..48be0ed03a728 100644
--- a/pkgs/applications/misc/zathura/pdf-poppler/default.nix
+++ b/pkgs/applications/misc/zathura/pdf-poppler/default.nix
@@ -1,4 +1,14 @@
-{ stdenv, lib, fetchurl, meson, ninja, pkg-config, zathura_core, girara, poppler }:
+{
+  stdenv,
+  lib,
+  fetchurl,
+  meson,
+  ninja,
+  pkg-config,
+  zathura_core,
+  girara,
+  poppler,
+}:
 
 stdenv.mkDerivation rec {
   pname = "zathura-pdf-poppler";
@@ -9,8 +19,16 @@ stdenv.mkDerivation rec {
     sha256 = "049h8m9swxni7ar6fsbm0hb3fg4ffmjc3m6vyg78ilfi3kayxavi";
   };
 
-  nativeBuildInputs = [ meson ninja pkg-config zathura_core ];
-  buildInputs = [ poppler girara ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    zathura_core
+  ];
+  buildInputs = [
+    poppler
+    girara
+  ];
 
   PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
 
diff --git a/pkgs/applications/misc/zathura/ps/default.nix b/pkgs/applications/misc/zathura/ps/default.nix
index 180001b52aeb4..437a0eb17c6cf 100644
--- a/pkgs/applications/misc/zathura/ps/default.nix
+++ b/pkgs/applications/misc/zathura/ps/default.nix
@@ -1,4 +1,15 @@
-{ stdenv, lib, fetchurl, meson, ninja, pkg-config, zathura_core, girara, libspectre, gettext }:
+{
+  stdenv,
+  lib,
+  fetchurl,
+  meson,
+  ninja,
+  pkg-config,
+  zathura_core,
+  girara,
+  libspectre,
+  gettext,
+}:
 
 stdenv.mkDerivation rec {
   pname = "zathura-ps";
@@ -9,8 +20,17 @@ stdenv.mkDerivation rec {
     sha256 = "0ilf63wxn1yzis9m3qs8mxbk316yxdzwxrrv86wpiygm9hhgk5sq";
   };
 
-  nativeBuildInputs = [ meson ninja pkg-config gettext ];
-  buildInputs = [ libspectre zathura_core girara ];
+  nativeBuildInputs = [
+    meson
+    ninja
+    pkg-config
+    gettext
+  ];
+  buildInputs = [
+    libspectre
+    zathura_core
+    girara
+  ];
 
   PKG_CONFIG_ZATHURA_PLUGINDIR = "lib/zathura";
 
@@ -20,10 +40,9 @@ stdenv.mkDerivation rec {
     longDescription = ''
       The zathura-ps plugin adds PS support to zathura by using the
       libspectre library.
-      '';
+    '';
     license = licenses.zlib;
     platforms = platforms.unix;
     maintainers = with maintainers; [ ];
   };
 }
-
diff --git a/pkgs/applications/misc/zathura/wrapper.nix b/pkgs/applications/misc/zathura/wrapper.nix
index 60ff0bd688546..627ad07ca9a70 100644
--- a/pkgs/applications/misc/zathura/wrapper.nix
+++ b/pkgs/applications/misc/zathura/wrapper.nix
@@ -1,25 +1,41 @@
-{ symlinkJoin, lib, makeWrapper, zathura_core, file, plugins ? [] }:
+{
+  symlinkJoin,
+  lib,
+  makeWrapper,
+  zathura_core,
+  file,
+  plugins ? [ ],
+}:
 symlinkJoin {
   name = "zathura-with-plugins-${zathura_core.version}";
 
-  paths = with zathura_core; [ man dev out ] ++ plugins;
+  paths =
+    with zathura_core;
+    [
+      man
+      dev
+      out
+    ]
+    ++ plugins;
 
   nativeBuildInputs = [ makeWrapper ];
 
-  postBuild = let
-    fishCompletion = "share/fish/vendor_completions.d/zathura.fish";
-  in ''
-    makeWrapper ${zathura_core.bin}/bin/zathura $out/bin/zathura \
-      --prefix PATH ":" "${lib.makeBinPath [ file ]}" \
-      --prefix ZATHURA_PLUGINS_PATH : "$out/lib/zathura"
+  postBuild =
+    let
+      fishCompletion = "share/fish/vendor_completions.d/zathura.fish";
+    in
+    ''
+      makeWrapper ${zathura_core.bin}/bin/zathura $out/bin/zathura \
+        --prefix PATH ":" "${lib.makeBinPath [ file ]}" \
+        --prefix ZATHURA_PLUGINS_PATH : "$out/lib/zathura"
 
-    # zathura fish completion references the zathura_core derivation to
-    # check for supported plugins which live in the wrapper derivation,
-    # so we need to fix the path to reference $out instead.
-    rm "$out/${fishCompletion}"
-    substitute "${zathura_core.out}/${fishCompletion}" "$out/${fishCompletion}" \
-      --replace "${zathura_core.out}" "$out"
-  '';
+      # zathura fish completion references the zathura_core derivation to
+      # check for supported plugins which live in the wrapper derivation,
+      # so we need to fix the path to reference $out instead.
+      rm "$out/${fishCompletion}"
+      substitute "${zathura_core.out}/${fishCompletion}" "$out/${fishCompletion}" \
+        --replace "${zathura_core.out}" "$out"
+    '';
 
   meta = with lib; {
     homepage = "https://git.pwmt.org/pwmt/zathura/";
@@ -32,7 +48,11 @@ symlinkJoin {
     '';
     license = licenses.zlib;
     platforms = platforms.unix;
-    maintainers = with maintainers; [ smironov globin TethysSvensson ];
+    maintainers = with maintainers; [
+      smironov
+      globin
+      TethysSvensson
+    ];
     mainProgram = "zathura";
   };
 }