nixpkgs/pkgs/applications/misc/zathura/ps/default.nix

38 lines
1.3 KiB
Nix
Raw Normal View History

2018-02-14 19:52:15 +00:00
{ stdenv, lib, fetchurl, pkgconfig, gtk2, zathura_core, girara, libspectre, gettext }:
stdenv.mkDerivation rec {
2017-12-31 01:05:11 +00:00
name = "zathura-ps-0.2.5";
src = fetchurl {
url = "http://pwmt.org/projects/zathura/plugins/download/${name}.tar.gz";
2017-12-31 01:05:11 +00:00
sha256 = "1x4knqja8pw2a5cb3y2209nr3iddj1z8nwasy48v5nprj61fdxqj";
};
nativeBuildInputs = [ pkgconfig ];
2018-02-14 19:52:15 +00:00
buildInputs = [ libspectre gettext zathura_core gtk2 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
makefileC1=$(sed -r 's/\.so/.dylib/g' Makefile)
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' )
echo "$makefileC2" > Makefile
echo "$makefileC2"
'';
makeFlags = [ "PREFIX=$(out)" "PLUGINDIR=$(out)/lib" ];
meta = with lib; {
homepage = http://pwmt.org/projects/zathura/;
description = "A zathura PS plugin";
longDescription = ''
The zathura-ps plugin adds PS support to zathura by using the
libspectre library.
'';
license = licenses.zlib;
2018-02-14 19:52:15 +00:00
platforms = platforms.unix;
maintainers = with maintainers; [ cstrahan garbas ];
};
}