1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 03:48:57 +00:00
nixpkgs/pkgs/applications/misc/zathura/djvu/default.nix

38 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, pkgconfig, gtk, zathura_core, girara, djvulibre, gettext }:
stdenv.mkDerivation rec {
2017-12-31 01:06:17 +00:00
name = "zathura-djvu-0.2.7";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
2017-12-31 01:06:17 +00:00
sha256 = "1sbfdsyp50qc85xc4458sn4w1rv1qbygdwmcr5kjlfpsmdq98vhd";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ djvulibre gettext zathura_core gtk girara ];
patches = [ ./gtkflags.patch ];
2018-02-15 07:44:40 +00:00
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
2018-02-14 19:52:15 +00: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
'';
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
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.
'';
license = licenses.zlib;
2018-02-14 19:52:15 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ garbas ];
};
}