zathuraPkgs: run nixfmt-rfc-style

This commit is contained in:
Lord-Valen 2024-05-26 14:02:58 -04:00
parent 5439ec8bd1
commit 61167e9c2a
No known key found for this signature in database
GPG Key ID: 5DEE1DF49CC27E39
8 changed files with 216 additions and 69 deletions

View File

@ -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 ];

View File

@ -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;

View File

@ -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

View File

@ -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; [ ];
};
}

View File

@ -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/";

View File

@ -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";

View File

@ -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; [ ];
};
}

View File

@ -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";
};
}