mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 22:03:54 +03:00
parent
8d10928ad0
commit
211adbeb38
@ -1,21 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
mkdir -pv $out/bin/
|
||||
mkdir -pv $out/share/
|
||||
mkdir -pv $out/share/applications/
|
||||
mkdir -pv $out/share/pixmaps/
|
||||
|
||||
cat > $out/bin/zathura <<EOF
|
||||
#!/bin/sh
|
||||
exec $zathura_core/bin/zathura --plugins-dir=$plugins_path "\$@"
|
||||
EOF
|
||||
|
||||
cp -rv $zathura_core/share/man $out/share
|
||||
cp -rv $zathura_core/share/locale $out/share
|
||||
cp -rv $icon $out/share/pixmaps/pwmt.xpm
|
||||
|
||||
cat $zathura_core/share/applications/zathura.desktop > $out/share/applications/zathura.desktop
|
||||
echo "Icon=pwmt" >> $out/share/applications/zathura.desktop
|
||||
|
||||
chmod 755 $out/bin/zathura
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, lib, fetchurl, pkgconfig, gtk, girara, ncurses, gettext, docutils, file, makeWrapper, zathura_icon, sqlite, glib
|
||||
, synctexSupport ? true, texlive ? null
|
||||
}:
|
||||
{ stdenv, lib, fetchurl, pkgconfig, gtk, girara, ncurses, gettext, docutils
|
||||
, file, makeWrapper, sqlite, glib
|
||||
, synctexSupport ? true, texlive ? null }:
|
||||
|
||||
assert synctexSupport -> texlive != null;
|
||||
|
||||
@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0fyb5hak0knqvg90rmdavwcmilhnrwgg1s5ykx9wd3skbpi8nsh8";
|
||||
};
|
||||
|
||||
icon = ./icon.xpm;
|
||||
|
||||
buildInputs = [ pkgconfig file gtk girara gettext makeWrapper sqlite glib
|
||||
] ++ lib.optional synctexSupport texlive.bin.core;
|
||||
|
||||
@ -27,23 +29,20 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/zathura" \
|
||||
--prefix PATH ":" "${file}/bin" \
|
||||
--prefix PATH ":" "${lib.makeBinPath [ file ]}" \
|
||||
--prefix XDG_CONFIG_DIRS ":" "$out/etc"
|
||||
|
||||
install -Dm644 $icon $out/share/pixmaps/pwmt.xpm
|
||||
mkdir -pv $out/etc
|
||||
echo "set window-icon ${zathura_icon}" > $out/etc/zathurarc
|
||||
echo "set window-icon $out/share/pixmaps/pwmt.xpm" > $out/etc/zathurarc
|
||||
echo "Icon=pwmt" >> $out/share/applications/zathura.desktop
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://pwmt.org/projects/zathura/;
|
||||
description = "A core component for zathura PDF viewer";
|
||||
license = stdenv.lib.licenses.zlib;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.garbas ];
|
||||
|
||||
# Set lower priority in order to provide user with a wrapper script called
|
||||
# 'zathura' instead of real zathura executable. The wrapper will build
|
||||
# plugin path argument before executing the original.
|
||||
priority = 1;
|
||||
license = licenses.zlib;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ garbas ];
|
||||
};
|
||||
}
|
||||
|
@ -1,59 +1,30 @@
|
||||
{ callPackage, lib, pkgs, fetchurl, stdenv, useMupdf, synctexSupport ? true }:
|
||||
{ pkgs, useMupdf ? true, synctexSupport ? true }:
|
||||
|
||||
rec {
|
||||
inherit stdenv;
|
||||
let
|
||||
callPackage = pkgs.newScope self;
|
||||
|
||||
icon = ./icon.xpm;
|
||||
|
||||
zathura_core = callPackage ./core {
|
||||
self = rec {
|
||||
gtk = pkgs.gtk3;
|
||||
zathura_icon = icon;
|
||||
inherit synctexSupport;
|
||||
};
|
||||
|
||||
zathura_pdf_poppler = callPackage ./pdf-poppler { };
|
||||
zathura_core = callPackage ./core {
|
||||
inherit synctexSupport;
|
||||
};
|
||||
|
||||
zathura_pdf_mupdf = callPackage ./pdf-mupdf {
|
||||
gtk = pkgs.gtk3;
|
||||
};
|
||||
zathura_pdf_poppler = callPackage ./pdf-poppler { };
|
||||
|
||||
zathura_djvu = callPackage ./djvu {
|
||||
gtk = pkgs.gtk3;
|
||||
};
|
||||
zathura_pdf_mupdf = callPackage ./pdf-mupdf { };
|
||||
|
||||
zathura_ps = callPackage ./ps {
|
||||
gtk = pkgs.gtk3;
|
||||
};
|
||||
zathura_djvu = callPackage ./djvu { };
|
||||
|
||||
zathuraWrapper = stdenv.mkDerivation {
|
||||
zathura_ps = callPackage ./ps { };
|
||||
|
||||
inherit zathura_core icon;
|
||||
|
||||
name = "zathura-${zathura_core.version}";
|
||||
|
||||
plugins_path = stdenv.lib.makeLibraryPath [
|
||||
zathura_djvu
|
||||
zathura_ps
|
||||
(if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler)
|
||||
];
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://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
|
||||
poppler rendering library and the gtk+ toolkit. The idea behind zathura
|
||||
is an application that provides a minimalistic and space saving interface
|
||||
as well as an easy usage that mainly focuses on keyboard interaction.
|
||||
'';
|
||||
license = licenses.zlib;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers;[ garbas smironov ];
|
||||
zathuraWrapper = callPackage ./wrapper.nix {
|
||||
plugins = [
|
||||
zathura_djvu
|
||||
zathura_ps
|
||||
(if useMupdf then zathura_pdf_mupdf else zathura_pdf_poppler)
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
in self.zathuraWrapper
|
||||
|
@ -12,18 +12,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [ ./gtkflags.patch ];
|
||||
|
||||
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
|
||||
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://pwmt.org/projects/zathura/;
|
||||
description = "A zathura DJVU plugin";
|
||||
longDescription = ''
|
||||
The zathura-djvu plugin adds DjVu support to zathura by using the
|
||||
djvulibre library.
|
||||
The zathura-djvu plugin adds DjVu support to zathura by using the
|
||||
djvulibre library.
|
||||
'';
|
||||
license = stdenv.lib.licenses.zlib;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.garbas ];
|
||||
license = licenses.zlib;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ garbas ];
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
{ stdenv, lib, fetchurl, pkgconfig, zathura_core, gtk, girara, mupdf, openssl, libjpeg, jbig2dec, openjpeg, fetchpatch}:
|
||||
{ stdenv, lib, fetchurl, pkgconfig, zathura_core, gtk, girara, mupdf, openssl
|
||||
, libjpeg, jbig2dec, openjpeg, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.3.0";
|
||||
@ -15,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [(fetchpatch {
|
||||
name = "mupdf-1.9.patch";
|
||||
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/mupdf-1.9.patch?h=packages/zathura-pdf-mupdf";
|
||||
url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/mupdf-1.9.patch?h=packages/zathura-pdf-mupdf&id=385ad96261b7297fdebbee6f4b22ec20dda8d65e";
|
||||
sha256 = "185wgg0z4b0z5aybcnnyvbs50h43imn5xz3nqmya4rk4v5bwy49y";
|
||||
})];
|
||||
|
||||
|
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [ pkgconfig poppler zathura_core girara ];
|
||||
|
||||
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
|
||||
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://pwmt.org/projects/zathura/;
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [ ./gtkflags.patch ];
|
||||
|
||||
makeFlags = "PREFIX=$(out) PLUGINDIR=$(out)/lib";
|
||||
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://pwmt.org/projects/zathura/;
|
||||
|
31
pkgs/applications/misc/zathura/wrapper.nix
Normal file
31
pkgs/applications/misc/zathura/wrapper.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ symlinkJoin, lib, makeWrapper, zathura_core, plugins ? [] }:
|
||||
|
||||
let
|
||||
pluginsPath = lib.makeLibraryPath plugins;
|
||||
|
||||
in symlinkJoin {
|
||||
name = "zathura-with-plugins-${zathura_core.version}";
|
||||
|
||||
paths = [ zathura_core ];
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/zathura \
|
||||
--add-flags --plugins-dir=${pluginsPath}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = http://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
|
||||
poppler rendering library and the gtk+ toolkit. The idea behind zathura
|
||||
is an application that provides a minimalistic and space saving interface
|
||||
as well as an easy usage that mainly focuses on keyboard interaction.
|
||||
'';
|
||||
license = licenses.zlib;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers;[ garbas smironov ];
|
||||
};
|
||||
}
|
@ -15540,13 +15540,9 @@ in
|
||||
|
||||
zam-plugins = callPackage ../applications/audio/zam-plugins { };
|
||||
|
||||
zathuraCollection = recurseIntoAttrs
|
||||
(callPackage ../applications/misc/zathura {
|
||||
callPackage = newScope pkgs.zathuraCollection;
|
||||
useMupdf = config.zathura.useMupdf or true;
|
||||
});
|
||||
|
||||
zathura = zathuraCollection.zathuraWrapper;
|
||||
zathura = callPackage ../applications/misc/zathura {
|
||||
useMupdf = config.zathura.useMupdf or true;
|
||||
};
|
||||
|
||||
zed = callPackage ../applications/editors/zed { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user