tracks lexicons and how many times they appeared on the jetstream
1{
2 stdenv,
3 makeBinaryWrapper,
4 bun,
5 client-modules,
6 PUBLIC_API_URL ? "http://localhost:3713",
7}:
8stdenv.mkDerivation {
9 pname = "client";
10 version = "main";
11
12 src = ../client;
13
14 inherit PUBLIC_API_URL;
15
16 nativeBuildInputs = [makeBinaryWrapper];
17 buildInputs = [bun];
18
19 dontCheck = true;
20
21 configurePhase = ''
22 runHook preConfigure
23 cp -R --no-preserve=ownership ${client-modules} node_modules
24 find node_modules -type d -exec chmod 755 {} \;
25 substituteInPlace node_modules/.bin/vite \
26 --replace-fail "/usr/bin/env node" "${bun}/bin/bun --bun"
27 runHook postConfigure
28 '';
29 buildPhase = ''
30 runHook preBuild
31 bun --prefer-offline run --bun build
32 runHook postBuild
33 '';
34 installPhase = ''
35 runHook preInstall
36 mkdir -p $out
37 cp -R ./build/* $out
38 runHook postInstall
39 '';
40}