Skip to content

Commit

Permalink
nezha-theme-nazhua: init at 0.4.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Moraxyc committed Dec 13, 2024
1 parent b8d33d0 commit 742b3fa
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions pkgs/by-name/ne/nezha-theme-nazhua/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
fetchYarnDeps,
nodejs,
nix-update-script,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "nezha-theme-nazhua";
version = "0.4.19";

src = fetchFromGitHub {
owner = "hi2shark";
repo = "nazhua";
tag = "v${finalAttrs.version}";
hash = "sha256-0104g2HldjMDvd4F9krhx7h6qLiYmzQ2cRprvFJcZeU=";
};

yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-Wy4xtLjDNkBLeESJCbfq9GhT0mSTAfGBN0A3oHX5BuE=";
};

nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
yarnInstallHook
# Needed for executing package.json scripts
nodejs
];

# Copied from .github/workflows/release.yml
env = {
VITE_NEZHA_VERSION = "v1";
VITE_SARASA_TERM_SC_USE_CDN = "1";
VITE_USE_CDN = "1";
VITE_CDN_LIB_TYPE = "jsdelivr";
};

dontNpmInstall = true;
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';

passthru.updateScript = nix-update-script { };

meta = {
description = "Nezha monitoring theme called Nazhua";
changelog = "https://github.com/hi2shark/nazhua/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/hi2shark/nazhua";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ moraxyc ];
};
})

0 comments on commit 742b3fa

Please sign in to comment.