From 39a621dc5341ac00c58c7843eb923ccad25cefc1 Mon Sep 17 00:00:00 2001 From: emaryn Date: Sat, 5 Apr 2025 08:36:47 +0800 Subject: [PATCH] zashboard: init at 1.77.0 --- pkgs/by-name/za/zashboard/package.nix | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkgs/by-name/za/zashboard/package.nix diff --git a/pkgs/by-name/za/zashboard/package.nix b/pkgs/by-name/za/zashboard/package.nix new file mode 100644 index 000000000000..55fc5b4c88b7 --- /dev/null +++ b/pkgs/by-name/za/zashboard/package.nix @@ -0,0 +1,57 @@ +{ + lib, + stdenv, + fetchFromGitHub, + pnpm_9, + nodejs, + nix-update-script, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "zashboard"; + version = "1.77.0"; + + src = fetchFromGitHub { + owner = "Zephyruso"; + repo = "zashboard"; + tag = "v${finalAttrs.version}"; + hash = "sha256-cjl8yrmx0mpaHRs3uNV6oqpi5/aO4LNsvIv+IPlQEjE="; + }; + + nativeBuildInputs = [ + pnpm_9.configHook + nodejs + ]; + + pnpmDeps = pnpm_9.fetchDeps { + inherit (finalAttrs) pname version src; + hash = "sha256-7mptT9cPhxz1VMtAtU2Na99xLtAoGcUHC0ca87Dv5Ng="; + }; + + buildPhase = '' + runHook preBuild + + pnpm run build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + cp -r dist $out + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Dashboard Using Clash API"; + homepage = "https://github.com/Zephyruso/zashboard"; + changelog = "https://github.com/Zephyruso/zashboard/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.mit; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ emaryn ]; + }; +})