Merge pull request #250471 from austinbutler/percollate-init

This commit is contained in:
Damien Cassou 2023-10-12 07:19:20 +02:00 committed by GitHub
commit de06eb1f31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,44 @@
{ lib, buildNpmPackage, fetchFromGitHub, chromium, makeWrapper }:
buildNpmPackage rec {
pname = "percollate";
version = "4.0.2";
src = fetchFromGitHub {
owner = "danburzo";
repo = pname;
rev = "v${version}";
hash = "sha256-QLbLg/zdDCZsRKgC4vR0OT//JHaapGmX33l7jIqUc1M=";
};
npmDepsHash = "sha256-Hxhgjdiz0zC/UlFXK8vvKZFI963Wi2Wx6iHWegr6f10=";
dontNpmBuild = true;
# Dev dependencies include an unnecessary Java dependency (epubchecker)
# https://github.com/danburzo/percollate/blob/v4.0.2/package.json#L40
npmInstallFlags = [ "--omit=dev" ];
nativeBuildInputs = [ makeWrapper ];
env = {
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true;
};
postPatch = ''
substituteInPlace package.json --replace "git config core.hooksPath .git-hooks" ""
'';
postInstall = ''
wrapProgram $out/bin/percollate \
--set PUPPETEER_EXECUTABLE_PATH ${chromium}/bin/chromium
'';
meta = with lib; {
description = "A command-line tool to turn web pages into readable PDF, EPUB, HTML, or Markdown docs";
homepage = "https://github.com/danburzo/percollate";
license = licenses.mit;
maintainers = [ maintainers.austinbutler ];
mainProgram = "percollate";
};
}

View File

@ -11992,6 +11992,8 @@ with pkgs;
peco = callPackage ../tools/text/peco { };
percollate = callPackage ../tools/text/percollate { };
pg_activity = callPackage ../development/tools/database/pg_activity { };
pg_checksums = callPackage ../development/tools/database/pg_checksums { };