{ stdenv, fetchurl, pkgconfig, djvulibre, poppler, fontconfig, libjpeg }: stdenv.mkDerivation rec { version = "0.9.8"; name = "pdf2djvu-${version}"; src = fetchurl { url = "https://github.com/jwilk/pdf2djvu/releases/download/${version}/${name}.tar.xz"; sha256 = "0kc3n4lm9dd13w66ng7l637ha241q89xrv9da0wzsdg6v0gp6ifg"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ djvulibre poppler fontconfig libjpeg ]; preConfigure = '' sed -i 's#\$djvulibre_bin_path#${djvulibre.bin}/bin#g' configure # Configure skips the failing check for usability of windres when it is nonempty. unset WINDRES ''; enableParallelBuilding = true; meta = with stdenv.lib; { description = "Creates djvu files from PDF files"; homepage = https://jwilk.net/software/pdf2djvu; license = licenses.gpl2; maintainers = with maintainers; [ pSub ]; inherit version; }; }