mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-31 17:23:34 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
37 lines
1.2 KiB
Nix
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";
|
|
};
|
|
}
|