Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nezha-theme-nazhua: init at 0.4.19 #364820

Merged
merged 3 commits into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.5.1";

src = fetchFromGitHub {
owner = "hi2shark";
repo = "nazhua";
tag = "v${finalAttrs.version}";
hash = "sha256-5XEdfUCwQSa+PWu4SHJCg3rCtblyD5x41lKe0SvFrU8=";
};

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 ];
};
})
Loading