Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / jitsi-excalidraw / default.nix
blob26b91355a7393135b7be5eed6656fab6fa92f19d
2   lib,
3   buildNpmPackage,
4   fetchFromGitHub,
5   nodejs,
6   python3,
7   nix-update-script,
8 }:
10 buildNpmPackage rec {
11   pname = "jitsi-excalidraw-backend";
12   version = "21";
14   src = fetchFromGitHub {
15     owner = "jitsi";
16     repo = "excalidraw-backend";
17     rev = "x${version}";
18     hash = "sha256-52LU5I2pNjSb9+nJjiczp/dLWRTwQDC+thyGXBvkBBA=";
19   };
21   npmDepsHash = "sha256-BJqjaqTeg5i+ECGMuiBYVToK2i2XCOVP9yeDFz6nP4k=";
23   nativeBuildInputs = [ python3 ];
25   installPhase = ''
26     mkdir -p $out/share
27     cp -r {node_modules,dist} $out/share
28   '';
30   postFixup = ''
31     makeWrapper ${nodejs}/bin/node $out/bin/jitsi-excalidraw-backend \
32       --add-flags dist/index.js \
33       --chdir $out/share
34   '';
36   passthru.updateScript = nix-update-script { };
38   meta = with lib; {
39     description = "Excalidraw collaboration backend for Jitsi";
40     homepage = "https://github.com/jitsi/excalidraw-backend";
41     license = licenses.mit;
42     maintainers = with maintainers; [ camillemndn ];
43     mainProgram = "jitsi-excalidraw-backend";
44   };