about summary refs log tree commit diff
path: root/pkgs/by-name/me
diff options
context:
space:
mode:
authorGuanran928 <68757440+Guanran928@users.noreply.github.com>2024-06-10 18:45:19 +0800
committerGitHub <noreply@github.com>2024-06-10 12:45:19 +0200
commite27092e106623b76e90cf41d0f8e5a0bf2ea5230 (patch)
tree49eefd709b88037eedee2ce8a87adb59f6e6f5a9 /pkgs/by-name/me
parent11485a636d7df8b53a517740a049d2da615a0957 (diff)
metacubexd: init at 1.140.0 (#297721)
* metacubexd: init at 1.140.0

* nixos/mihomo: add example for cfg.webui
Diffstat (limited to 'pkgs/by-name/me')
-rw-r--r--pkgs/by-name/me/metacubexd/package.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/by-name/me/metacubexd/package.nix b/pkgs/by-name/me/metacubexd/package.nix
new file mode 100644
index 0000000000000..c55083e5b224b
--- /dev/null
+++ b/pkgs/by-name/me/metacubexd/package.nix
@@ -0,0 +1,55 @@
+{
+  lib,
+  fetchFromGitHub,
+  nix-update-script,
+  nodejs,
+  pnpm,
+  stdenv,
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "metacubexd";
+  version = "1.140.0";
+
+  src = fetchFromGitHub {
+    owner = "MetaCubeX";
+    repo = "metacubexd";
+    rev = "v${finalAttrs.version}";
+    hash = "sha256-OVLG+MHgwWTorPuBTHsHUAY1FSN91j7xWgRDJ7FiO7E=";
+  };
+
+  nativeBuildInputs = [
+    pnpm.configHook
+    nodejs
+  ];
+
+  pnpmDeps = pnpm.fetchDeps {
+    inherit (finalAttrs) pname version src;
+    hash = "sha256-24PkWT5UZJwMtL3y8qdf3XFuf3v5PjiP9XESbw3oppY=";
+  };
+
+  buildPhase = ''
+    runHook preBuild
+
+    pnpm build
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    cp -r ./dist $out
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = nix-update-script { };
+
+  meta = {
+    description = "Clash.Meta Dashboard, The Official One, XD";
+    homepage = "https://github.com/MetaCubeX/metacubexd";
+    license = lib.licenses.mit;
+    platforms = lib.platforms.all;
+    maintainers = with lib.maintainers; [ Guanran928 ];
+  };
+})