1 { lib, buildNpmPackage, fetchFromGitHub, chromium, makeWrapper }:
7 src = fetchFromGitHub {
11 hash = "sha256-JpdSEockALXtuuMMi5mgD5AXcayojyK0qMMWF+XFfZE=";
14 npmDepsHash = "sha256-qWu1YYi4ddpAUtbDxF4YA8OO6BLZ6gfeb4pw0n9BaZw=";
18 # Dev dependencies include an unnecessary Java dependency (epubchecker)
19 # https://github.com/danburzo/percollate/blob/v4.2.3/package.json#L40
20 npmInstallFlags = [ "--omit=dev" ];
22 nativeBuildInputs = [ makeWrapper ];
25 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true;
29 substituteInPlace package.json --replace "git config core.hooksPath .git-hooks" ""
33 wrapProgram $out/bin/percollate \
34 --set PUPPETEER_EXECUTABLE_PATH ${chromium}/bin/chromium
38 description = "Command-line tool to turn web pages into readable PDF, EPUB, HTML, or Markdown docs";
39 homepage = "https://github.com/danburzo/percollate";
40 license = licenses.mit;
41 maintainers = [ maintainers.austinbutler ];
42 mainProgram = "percollate";