Files
nixpkgs/pkgs/by-name/pd/pdf2djvu/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

70 lines
1.2 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
autoreconfHook,
gettext,
libtool,
pkg-config,
djvulibre,
exiv2,
fontconfig,
graphicsmagick,
libjpeg,
libuuid,
poppler,
}:
stdenv.mkDerivation rec {
version = "0.9.19";
pname = "pdf2djvu";
src = fetchFromGitHub {
owner = "jwilk";
repo = "pdf2djvu";
rev = version;
sha256 = "sha256-j4mYdmLZ56qTA1KbWBjBvyTyLaeuIITKYsALRIO7lj0=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
djvulibre
exiv2
fontconfig
graphicsmagick
libjpeg
libuuid
poppler
];
postPatch = ''
substituteInPlace private/autogen \
--replace /usr/share/gettext ${gettext}/share/gettext \
--replace /usr/share/libtool ${libtool}/share/libtool
substituteInPlace configure.ac \
--replace '$djvulibre_bin_path' ${djvulibre.bin}/bin
'';
preAutoreconf = ''
private/autogen
'';
enableParallelBuilding = true;
# Required by Poppler
CXXFLAGS = "-std=c++20";
meta = with lib; {
description = "Creates djvu files from PDF files";
homepage = "https://jwilk.net/software/pdf2djvu";
license = licenses.gpl2Only;
maintainers = with maintainers; [ pSub ];
mainProgram = "pdf2djvu";
};
}