blob: a0672d82fc53c9822f8274fe49810cde1d84ac6a (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{
lib,
buildNpmPackage,
fetchFromGitHub,
nix-update-script,
}:
buildNpmPackage rec {
pname = "nezha-theme-admin";
version = "1.13.1";
src = fetchFromGitHub {
owner = "nezhahq";
repo = "admin-frontend";
tag = "v${version}";
hash = "sha256-VHj6eUIBdIUJ1eUoa2Yog3maee89aMF5yEO9NbDXflQ=";
};
# TODO: Switch to the bun build function once available in nixpkgs
postPatch = ''
cp ${./package-lock.json} package-lock.json
'';
npmDepsHash = "sha256-th0rnTrS/gZ5gMuZda0/fllVc8g9iPc8/gEos+3E3kU=";
npmPackFlags = [ "--ignore-scripts" ];
npmBuildScript = "build-ignore-error";
dontNpmInstall = true;
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
meta = {
description = "Nezha monitoring admin frontend";
homepage = "https://github.com/nezhahq/admin-frontend";
changelog = "https://github.com/nezhahq/admin-frontend/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ moraxyc ];
};
}
|