Commit b7080b2d authored by Charlotte Hartmann Paludo's avatar Charlotte Hartmann Paludo Committed by Felix Buehler
Browse files

bentopdf: init at 1.11.2

parent 73fbc5be
Loading
Loading
Loading
Loading
+49 −0
Original line number Diff line number Diff line
{
  lib,
  buildNpmPackage,
  fetchFromGitHub,
  simpleMode ? true,
}:
buildNpmPackage (finalAttrs: {
  pname = "bentopdf";
  # We intentionally don't update the version, due to:
  # https://github.com/NixOS/nixpkgs/issues/484067
  # nixpkgs-update: no auto update
  version = "1.11.2";

  src = fetchFromGitHub {
    owner = "alam00000";
    repo = "bentopdf";
    tag = "v${finalAttrs.version}";
    hash = "sha256-br4My0Q4zoA+ZIrXM4o4oQjZ7IpSdwg+iKiAUdc2B/s=";
  };
  npmDepsHash = "sha256-UNNNYO7e7qdumI0/ka2ieFZzKURPl1V3981vHCPcVfY=";

  npmBuildFlags = [
    "--"
    "--mode"
    "production"
  ];

  env.SIMPLE_MODE = lib.boolToString simpleMode;

  installPhase = ''
    runHook preInstall

    mkdir -p $out
    cp -r dist/* $out/

    runHook postInstall
  '';

  meta = {
    description = "Privacy-first PDF toolkit";
    homepage = "https://bentopdf.com";
    changelog = "https://github.com/alam00000/bentopdf/releases";
    license = lib.licenses.agpl3Only;
    maintainers = with lib.maintainers; [
      charludo
      stunkymonkey
    ];
  };
})