nixpkgs/pkgs/applications/misc/zathura/pdf-mupdf/default.nix

43 lines
1.4 KiB
Nix
Raw Normal View History

2018-02-14 20:52:15 +01:00
{ stdenv, lib, fetchurl, pkgconfig, zathura_core, gtk,
gtk-mac-integration, girara, mupdf, openssl , libjpeg, jbig2dec,
openjpeg, fetchpatch }:
2014-05-17 14:16:50 +02:00
stdenv.mkDerivation rec {
2017-12-31 02:01:57 +01:00
version = "0.3.2";
2014-05-17 14:16:50 +02:00
name = "zathura-pdf-mupdf-${version}";
2015-11-25 16:04:30 +01:00
src = fetchurl {
url = "https://pwmt.org/projects/zathura-pdf-mupdf/download/${name}.tar.gz";
2017-12-31 02:01:57 +01:00
sha256 = "0xkajc3is7ncmb2fmymbzfgrran2bz12i7zsm1vvxhxds728h7ck";
2014-05-17 14:16:50 +02:00
};
nativeBuildInputs = [ pkgconfig ];
2018-02-14 20:52:15 +01:00
buildInputs = [
zathura_core gtk girara openssl mupdf libjpeg jbig2dec openjpeg
2018-02-15 08:44:40 +01:00
] ++ stdenv.lib.optional stdenv.isDarwin [
2018-02-14 20:52:15 +01:00
gtk-mac-integration
];
2018-02-15 08:44:40 +01:00
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
2018-02-14 20:52:15 +01:00
string1='-shared ''${LDFLAGS} -o $@ ''$(OBJECTS) ''${LIBS}'
string2='-Wl,-dylib_install_name,''${PLUGIN}.dylib -Wl,-bundle_loader,${zathura_core}/bin/.zathura-wrapped -bundle ''${LDFLAGS} -o $@ ''${OBJECTS} ''${LIBS}'
makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile)
echo "''${makefileC1/$string1/$string2}" > Makefile
'';
2014-05-17 14:16:50 +02:00
2015-11-25 16:04:30 +01:00
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
2014-05-17 14:16:50 +02:00
meta = with lib; {
2014-05-17 14:16:50 +02:00
homepage = http://pwmt.org/projects/zathura/;
description = "A zathura PDF plugin (mupdf)";
longDescription = ''
The zathura-pdf-mupdf plugin adds PDF support to zathura by
using the mupdf rendering library.
'';
license = licenses.zlib;
2018-02-14 20:52:15 +01:00
platforms = platforms.unix;
maintainers = with maintainers; [ cstrahan ];
2014-05-17 14:16:50 +02:00
};
}