From b698b0234a37bf8b9d352189d50320ab83927a12 Mon Sep 17 00:00:00 2001 From: chillcicada <2210227279@qq.com> Date: Tue, 14 Apr 2026 11:11:39 +0800 Subject: [PATCH] zashboard: init at 0.3.4 --- pkgs/by-name/za/zashboard/package.nix | 58 +++++++++++++++++++++++++++ pkgs/top-level/aliases.nix | 1 - 2 files changed, 58 insertions(+), 1 deletion(-) 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..9ab47d6579ae --- /dev/null +++ b/pkgs/by-name/za/zashboard/package.nix @@ -0,0 +1,58 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, + pnpm_10, + pnpm ? pnpm_10, + fetchPnpmDeps, + pnpmConfigHook, + nix-update-script, +}: + +buildNpmPackage (finalAttrs: { + pname = "zashboard"; + version = "3.4.0"; + + src = fetchFromGitHub { + owner = "Zephyruso"; + repo = "zashboard"; + tag = "v${finalAttrs.version}"; + hash = "sha256-S5NrXjD34UwbsYQrHWMAgLc10/R1U2ZZ1gW0zkUXg6w="; + }; + + npmDeps = null; + pnpmDeps = fetchPnpmDeps { + inherit (finalAttrs) pname version src; + inherit pnpm; + fetcherVersion = 3; + hash = "sha256-DMR9vNgsWdBK0BbSGzxEZUBZpa4szF2NIFO/GePwIUw="; + }; + + nativeBuildInputs = [ pnpm ]; + npmConfigHook = pnpmConfigHook; + + postPatch = '' + substituteInPlace vite.config.ts \ + --replace-fail "getGitCommitId()" '""' + ''; + + __darwinAllowLocalNetworking = true; + + 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/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ chillcicada ]; + }; +}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1331fca251ee..6fa1327c12f8 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -2491,7 +2491,6 @@ mapAliases { zabbix72 = throw "'zabbix72' was removed as it has reached its end of life"; # Added 2026-02-11 zandronum-alpha = throw "'zandronum-alpha' has been removed as it was broken and the stable version has caught up"; # Added 2025-10-19 zandronum-alpha-server = throw "'zandronum-alpha-server' has been removed as it was broken and the stable version has caught up"; # Added 2025-10-19 - zashboard = throw "'zashboard' has been removed because upstream repository source code has been deleted"; # Added 2025-12-29 zbackup = throw "'zbackup' has been removed due to being unmaintained upstream"; # Added 2025-08-22 zdoom = throw "'zdoom' has been removed as it was broken and unmaintained upstream. Consider using UZDoom instead."; # Added 2026-04-04 zeal-qt5 = warnAlias "'zeal-qt5' has been removed from nixpkgs. Please use 'zeal' instead" zeal; # Added 2025-08-31