Merge pull request #34973 from pallavagarwal07/zathura

zathura: make compatible with darwin

authored by Jörg Thalheim and committed by GitHub 4857b148 aaeeff6f

+57 -19
+10 -5
pkgs/applications/misc/zathura/core/default.nix
··· 1 { stdenv, fetchurl, makeWrapper, pkgconfig 2 , gtk, girara, ncurses, gettext, docutils 3 - , file, sqlite, glib, texlive 4 - , synctexSupport ? true 5 }: 6 7 assert synctexSupport -> texlive != null; ··· 19 20 icon = ./icon.xpm; 21 22 - nativeBuildInputs = [ pkgconfig ]; 23 buildInputs = [ 24 file gtk girara 25 gettext makeWrapper sqlite glib 26 - ] ++ optional synctexSupport texlive.bin.core; 27 28 NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; 29 30 makeFlags = [ ··· 50 homepage = http://pwmt.org/projects/zathura/; 51 description = "A core component for zathura PDF viewer"; 52 license = licenses.zlib; 53 - platforms = platforms.linux; 54 maintainers = with maintainers; [ garbas ]; 55 }; 56 }
··· 1 { stdenv, fetchurl, makeWrapper, pkgconfig 2 , gtk, girara, ncurses, gettext, docutils 3 + , file, sqlite, glib, texlive, libintlOrEmpty 4 + , gtk-mac-integration, synctexSupport ? true 5 }: 6 7 assert synctexSupport -> texlive != null; ··· 19 20 icon = ./icon.xpm; 21 22 + nativeBuildInputs = [ 23 + pkgconfig 24 + ] ++ optional stdenv.isDarwin [ libintlOrEmpty ]; 25 + 26 buildInputs = [ 27 file gtk girara 28 gettext makeWrapper sqlite glib 29 + ] ++ optional synctexSupport texlive.bin.core 30 + ++ optional stdenv.isDarwin [ gtk-mac-integration ]; 31 32 + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl"; 33 NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; 34 35 makeFlags = [ ··· 55 homepage = http://pwmt.org/projects/zathura/; 56 description = "A core component for zathura PDF viewer"; 57 license = licenses.zlib; 58 + platforms = platforms.unix; 59 maintainers = with maintainers; [ garbas ]; 60 }; 61 }
+8 -1
pkgs/applications/misc/zathura/djvu/default.nix
··· 13 14 patches = [ ./gtkflags.patch ]; 15 16 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 17 18 meta = with stdenv.lib; { ··· 23 djvulibre library. 24 ''; 25 license = licenses.zlib; 26 - platforms = platforms.linux; 27 maintainers = with maintainers; [ garbas ]; 28 }; 29 }
··· 13 14 patches = [ ./gtkflags.patch ]; 15 16 + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' 17 + string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}' 18 + string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}' 19 + makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile) 20 + echo "''${makefileC1/$string1/$string2}" > Makefile 21 + ''; 22 + 23 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 24 25 meta = with stdenv.lib; { ··· 30 djvulibre library. 31 ''; 32 license = licenses.zlib; 33 + platforms = platforms.unix; 34 maintainers = with maintainers; [ garbas ]; 35 }; 36 }
+17 -4
pkgs/applications/misc/zathura/pdf-mupdf/default.nix
··· 1 - { stdenv, lib, fetchurl, pkgconfig, zathura_core, gtk, girara, mupdf, openssl 2 - , libjpeg, jbig2dec, openjpeg, fetchpatch }: 3 4 stdenv.mkDerivation rec { 5 version = "0.3.2"; ··· 11 }; 12 13 nativeBuildInputs = [ pkgconfig ]; 14 - buildInputs = [ zathura_core gtk girara openssl mupdf libjpeg jbig2dec openjpeg ]; 15 16 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 17 ··· 23 using the mupdf rendering library. 24 ''; 25 license = licenses.zlib; 26 - platforms = platforms.linux; 27 maintainers = with maintainers; [ cstrahan ]; 28 }; 29 }
··· 1 + { stdenv, lib, fetchurl, pkgconfig, zathura_core, gtk, 2 + gtk-mac-integration, girara, mupdf, openssl , libjpeg, jbig2dec, 3 + openjpeg, fetchpatch }: 4 5 stdenv.mkDerivation rec { 6 version = "0.3.2"; ··· 12 }; 13 14 nativeBuildInputs = [ pkgconfig ]; 15 + 16 + buildInputs = [ 17 + zathura_core gtk girara openssl mupdf libjpeg jbig2dec openjpeg 18 + ] ++ stdenv.lib.optional stdenv.isDarwin [ 19 + gtk-mac-integration 20 + ]; 21 + 22 + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' 23 + string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}' 24 + string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}' 25 + makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile) 26 + echo "''${makefileC1/$string1/$string2}" > Makefile 27 + ''; 28 29 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 30 ··· 36 using the mupdf rendering library. 37 ''; 38 license = licenses.zlib; 39 + platforms = platforms.unix; 40 maintainers = with maintainers; [ cstrahan ]; 41 }; 42 }
+10 -3
pkgs/applications/misc/zathura/pdf-poppler/default.nix
··· 9 sha256 = "1m55m7s7f8ng8a7lmcw9z4n5zv7xk4vp9n6fp9j84z6rk2imf7a2"; 10 }; 11 12 - nativeBuildInputs = [ pkgconfig ]; 13 - buildInputs = [ poppler zathura_core girara ]; 14 15 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 16 17 meta = with lib; { 18 homepage = http://pwmt.org/projects/zathura/; 19 description = "A zathura PDF plugin (poppler)"; ··· 22 using the poppler rendering library. 23 ''; 24 license = licenses.zlib; 25 - platforms = platforms.linux; 26 maintainers = with maintainers; [ cstrahan garbas ]; 27 }; 28 }
··· 9 sha256 = "1m55m7s7f8ng8a7lmcw9z4n5zv7xk4vp9n6fp9j84z6rk2imf7a2"; 10 }; 11 12 + nativeBuildInputs = [ pkgconfig zathura_core ]; 13 + buildInputs = [ poppler girara ]; 14 15 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 16 17 + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' 18 + string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}' 19 + string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}' 20 + makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile) 21 + echo "''${makefileC1/$string1/$string2}" > Makefile 22 + ''; 23 + 24 meta = with lib; { 25 homepage = http://pwmt.org/projects/zathura/; 26 description = "A zathura PDF plugin (poppler)"; ··· 29 using the poppler rendering library. 30 ''; 31 license = licenses.zlib; 32 + platforms = platforms.unix; 33 maintainers = with maintainers; [ cstrahan garbas ]; 34 }; 35 }
+10 -3
pkgs/applications/misc/zathura/ps/default.nix
··· 1 - { stdenv, lib, fetchurl, pkgconfig, gtk, zathura_core, girara, libspectre, gettext }: 2 3 stdenv.mkDerivation rec { 4 name = "zathura-ps-0.2.5"; ··· 9 }; 10 11 nativeBuildInputs = [ pkgconfig ]; 12 - buildInputs = [ libspectre gettext zathura_core gtk girara ]; 13 14 patches = [ ./gtkflags.patch ]; 15 16 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 17 18 meta = with lib; { ··· 23 libspectre library. 24 ''; 25 license = licenses.zlib; 26 - platforms = platforms.linux; 27 maintainers = with maintainers; [ cstrahan garbas ]; 28 }; 29 }
··· 1 + { stdenv, lib, fetchurl, pkgconfig, gtk2, zathura_core, girara, libspectre, gettext }: 2 3 stdenv.mkDerivation rec { 4 name = "zathura-ps-0.2.5"; ··· 9 }; 10 11 nativeBuildInputs = [ pkgconfig ]; 12 + buildInputs = [ libspectre gettext zathura_core gtk2 girara ]; 13 14 patches = [ ./gtkflags.patch ]; 15 16 + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' 17 + makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile) 18 + makefileC2=$(echo "$makefileC1" | sed 's|-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}|-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}|g' ) 19 + echo "$makefileC2" > Makefile 20 + echo "$makefileC2" 21 + ''; 22 + 23 makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ]; 24 25 meta = with lib; { ··· 30 libspectre library. 31 ''; 32 license = licenses.zlib; 33 + platforms = platforms.unix; 34 maintainers = with maintainers; [ cstrahan garbas ]; 35 }; 36 }
+2 -3
pkgs/applications/misc/zathura/wrapper.nix
··· 11 buildInputs = [ makeWrapper ]; 12 13 postBuild = '' 14 - wrapProgram $out/bin/zathura \ 15 - --add-flags --plugins-dir=${pluginsPath} 16 ''; 17 18 meta = with lib; { ··· 25 as well as an easy usage that mainly focuses on keyboard interaction. 26 ''; 27 license = licenses.zlib; 28 - platforms = platforms.linux; 29 maintainers = with maintainers;[ garbas smironov ]; 30 }; 31 }
··· 11 buildInputs = [ makeWrapper ]; 12 13 postBuild = '' 14 + wrapProgram $out/bin/zathura --add-flags --plugins-dir=${pluginsPath} 15 ''; 16 17 meta = with lib; { ··· 24 as well as an easy usage that mainly focuses on keyboard interaction. 25 ''; 26 license = licenses.zlib; 27 + platforms = platforms.unix; 28 maintainers = with maintainers;[ garbas smironov ]; 29 }; 30 }