nixpkgs/pkgs/tools/typesetting/pdf2djvu/default.nix

63 lines
1.1 KiB
Nix
Raw Normal View History

2020-03-06 03:49:52 +00:00
{ stdenv
, lib
, fetchFromGitHub
, autoreconfHook
, gettext
, libtool
, pkgconfig
, djvulibre
, exiv2
, fontconfig
, graphicsmagick
, libjpeg
, libuuid
, poppler
}:
stdenv.mkDerivation rec {
2020-08-11 10:17:28 +00:00
version = "0.9.17.1";
pname = "pdf2djvu";
2020-03-06 03:49:52 +00:00
src = fetchFromGitHub {
owner = "jwilk";
repo = "pdf2djvu";
rev = version;
2020-08-11 10:17:28 +00:00
sha256 = "1igabfy3fd7qndihmkfk9incc15pjxpxh2cn5pfw5fxfwrpjrarn";
};
2020-03-06 03:49:52 +00:00
nativeBuildInputs = [ autoreconfHook pkgconfig ];
2020-03-06 03:49:52 +00:00
buildInputs = [
djvulibre
exiv2
fontconfig
graphicsmagick
libjpeg
libuuid
poppler
];
2020-03-06 03:49:52 +00:00
postPatch = ''
substituteInPlace private/autogen \
--replace /usr/share/gettext ${gettext}/share/gettext \
--replace /usr/share/libtool ${libtool}/share/libtool
2020-03-06 03:49:52 +00:00
substituteInPlace configure.ac \
--replace '$djvulibre_bin_path' ${djvulibre.bin}/bin
'';
2020-03-06 03:49:52 +00:00
preAutoreconf = ''
private/autogen
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Creates djvu files from PDF files";
2020-03-06 03:49:52 +00:00
homepage = "https://jwilk.net/software/pdf2djvu";
license = licenses.gpl2;
maintainers = with maintainers; [ pSub ];
2013-03-21 07:44:01 +00:00
inherit version;
};
}