From 61167e9c2a42b05b508dec15f27e0d100e01326d Mon Sep 17 00:00:00 2001 From: Lord-Valen Date: Sun, 26 May 2024 14:02:58 -0400 Subject: [PATCH 1/5] zathuraPkgs: run nixfmt-rfc-style --- pkgs/applications/misc/zathura/cb/default.nix | 29 +++++++-- .../misc/zathura/core/default.nix | 63 +++++++++++++++---- pkgs/applications/misc/zathura/default.nix | 13 ++-- .../misc/zathura/djvu/default.nix | 29 +++++++-- .../misc/zathura/pdf-mupdf/default.nix | 46 ++++++++------ .../misc/zathura/pdf-poppler/default.nix | 24 ++++++- pkgs/applications/misc/zathura/ps/default.nix | 29 +++++++-- pkgs/applications/misc/zathura/wrapper.nix | 52 ++++++++++----- 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 ea2c74fda370..84ddd0e70ba8 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 8b452c7f1a40..8dd529c6b6cc 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 67fe3032d05c..23b5ce0198e1 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 f0fe09486324..b4ce653770e3 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 f6eb5cfd45e1..f3810c4b7c26 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 5246705bbd8b..48be0ed03a72 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 180001b52aeb..437a0eb17c6c 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 60ff0bd68854..627ad07ca9a7 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"; }; } From 0d29dc5000b6011fdaeb71031cdad70be44944e6 Mon Sep 17 00:00:00 2001 From: Lord-Valen Date: Sun, 26 May 2024 14:03:26 -0400 Subject: [PATCH 2/5] zathura: update homepage --- pkgs/applications/misc/zathura/core/default.nix | 2 +- pkgs/applications/misc/zathura/wrapper.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index 8dd529c6b6cc..fdaf6e722e57 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = gitUpdater { }; meta = with lib; { - homepage = "https://git.pwmt.org/pwmt/zathura"; + homepage = "https://pwmt.org/projects/zathura"; description = "A core component for zathura PDF viewer"; license = licenses.zlib; platforms = platforms.unix; diff --git a/pkgs/applications/misc/zathura/wrapper.nix b/pkgs/applications/misc/zathura/wrapper.nix index 627ad07ca9a7..0294d0efadf9 100644 --- a/pkgs/applications/misc/zathura/wrapper.nix +++ b/pkgs/applications/misc/zathura/wrapper.nix @@ -38,7 +38,7 @@ symlinkJoin { ''; meta = with lib; { - homepage = "https://git.pwmt.org/pwmt/zathura/"; + homepage = "https://pwmt.org/projects/zathura/"; description = "A highly customizable and functional PDF viewer"; longDescription = '' Zathura is a highly customizable and functional PDF viewer based on the From 34082ca934f416b1cdb808408cf6b6f991f0f850 Mon Sep 17 00:00:00 2001 From: Lord-Valen Date: Sun, 26 May 2024 13:37:32 -0400 Subject: [PATCH 3/5] zathuraPkgs: use hash --- pkgs/applications/misc/zathura/cb/default.nix | 2 +- pkgs/applications/misc/zathura/djvu/default.nix | 2 +- pkgs/applications/misc/zathura/pdf-poppler/default.nix | 2 +- pkgs/applications/misc/zathura/ps/default.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/zathura/cb/default.nix b/pkgs/applications/misc/zathura/cb/default.nix index 84ddd0e70ba8..f8e29a65a3a6 100644 --- a/pkgs/applications/misc/zathura/cb/default.nix +++ b/pkgs/applications/misc/zathura/cb/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz"; - sha256 = "1j5v32f9ki35v1jc7a067anhlgqplzrp4fqvznlixfhcm0bwmc49"; + hash = "sha256-ibDKF6gMuh6p/Rs7cvOnFz8KrToGqMNk2GXEmZwYu8g="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/misc/zathura/djvu/default.nix b/pkgs/applications/misc/zathura/djvu/default.nix index b4ce653770e3..9805f19c4693 100644 --- a/pkgs/applications/misc/zathura/djvu/default.nix +++ b/pkgs/applications/misc/zathura/djvu/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz"; - sha256 = "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln"; + hash = "sha256-lub4pu5TIxBzsvcAMmSHL4RQHmPD2nvwWY0EYoawwgA="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/misc/zathura/pdf-poppler/default.nix b/pkgs/applications/misc/zathura/pdf-poppler/default.nix index 48be0ed03a72..4d216b9c0c63 100644 --- a/pkgs/applications/misc/zathura/pdf-poppler/default.nix +++ b/pkgs/applications/misc/zathura/pdf-poppler/default.nix @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz"; - sha256 = "049h8m9swxni7ar6fsbm0hb3fg4ffmjc3m6vyg78ilfi3kayxavi"; + hash = "sha256-cavu1RzR0YjO89vUwWR1jjw3FgR1aWeyOtF2rlNFMBE="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/misc/zathura/ps/default.nix b/pkgs/applications/misc/zathura/ps/default.nix index 437a0eb17c6c..10db97aa8b34 100644 --- a/pkgs/applications/misc/zathura/ps/default.nix +++ b/pkgs/applications/misc/zathura/ps/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz"; - sha256 = "0ilf63wxn1yzis9m3qs8mxbk316yxdzwxrrv86wpiygm9hhgk5sq"; + hash = "sha256-WJf5IEz1+Xi5QTvnzn/r3oQxV69I41GTjt8H2/kwjkY="; }; nativeBuildInputs = [ From 5341a1e5e5aa669501be0bb1f43b93d7e3ad8b36 Mon Sep 17 00:00:00 2001 From: Lord-Valen Date: Sun, 26 May 2024 13:48:18 -0400 Subject: [PATCH 4/5] zathura-pdf-mupdf: 0.4.1 -> 0.4.2 --- pkgs/applications/misc/zathura/pdf-mupdf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix index f3810c4b7c26..66376746cf8c 100644 --- a/pkgs/applications/misc/zathura/pdf-mupdf/default.nix +++ b/pkgs/applications/misc/zathura/pdf-mupdf/default.nix @@ -21,12 +21,12 @@ }: stdenv.mkDerivation rec { - version = "0.4.1"; + version = "0.4.2"; pname = "zathura-pdf-mupdf"; src = fetchurl { url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz"; - hash = "sha256-+YKgHWUj+iVmk4EYTAamJe2/15YcvbBxHcz9ucQCrC8="; + hash = "sha256-fFC+z9mJX9ccExsV336Ut+zJJa8UdfUz/qVp9YgcnhM="; }; nativeBuildInputs = [ From cca76d7cbe4404b74cc364584201113352d940a3 Mon Sep 17 00:00:00 2001 From: Lord-Valen Date: Sun, 26 May 2024 13:49:35 -0400 Subject: [PATCH 5/5] zathura: 0.5.5 -> 0.5.6 --- pkgs/applications/misc/zathura/core/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix index fdaf6e722e57..9b8193a52bd8 100644 --- a/pkgs/applications/misc/zathura/core/default.nix +++ b/pkgs/applications/misc/zathura/core/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, - fetchFromGitLab, + fetchFromGitHub, meson, ninja, wrapGAppsHook3, @@ -28,14 +28,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "zathura"; - version = "0.5.5"; + version = "0.5.6"; - src = fetchFromGitLab { - domain = "git.pwmt.org"; + src = fetchFromGitHub { owner = "pwmt"; repo = "zathura"; rev = finalAttrs.version; - hash = "sha256-mHEYqgBB55p8nykFtvYtP5bWexp/IqFbeLs7gZmXCeE="; + hash = "sha256-lTEBIZ3lkzjJ+L1qecrcL8iseo8AvSIo3Wh65/ikwac="; }; outputs = [