nixpkgs/pkgs/tools/misc/zotero-translation-server/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

37 lines
1.2 KiB
Nix

{ lib, buildNpmPackage, fetchFromGitHub, nodejs }:
buildNpmPackage rec {
pname = "zotero-translation-server";
version = "unstable-2023-07-13";
src = fetchFromGitHub {
owner = "zotero";
repo = "translation-server";
rev = "cf96d57f4e2af66fee7df9bad00681b3f4ac7d77";
hash = "sha256-GJn7UAl0raVGzplvFzo4A0RUjNbyGt/YI2mt1UZIJv0=";
fetchSubmodules = true;
};
npmDepsHash = "sha256-JHoBxUybs1GGRxEVG5GgX2mOCplTgR5dcPjnR42SEbY=";
makeCacheWritable = true;
dontNpmBuild = true;
postInstall = ''
mkdir -p $out/bin/ $out/share/zotero-translation-server/
makeWrapper ${nodejs}/bin/node $out/bin/translation-server \
--add-flags "$out/lib/node_modules/translation-server/src/server.js"
ln -s $out/lib/node_modules/translation-server/config $out/share/zotero-translation-server/config
ln -s $out/lib/node_modules/translation-server/modules $out/share/zotero-translation-server/modules
'';
meta = with lib; {
description = "Node.js-based server to run Zotero translators";
homepage = "https://github.com/zotero/translation-server";
license = licenses.agpl3Only;
maintainers = [ ];
mainProgram = "translation-server";
};
}