nixpkgs/pkgs/by-name/me/metacubexd/package.nix
2024-08-22 21:16:27 +08:00

56 lines
1.0 KiB
Nix

{
lib,
fetchFromGitHub,
nix-update-script,
nodejs,
pnpm,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "metacubexd";
version = "1.146.1";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "metacubexd";
rev = "v${finalAttrs.version}";
hash = "sha256-Vm2DPdfHx0WtB8RFq0wfCvBVdGVaX6PXrN/nAtNKv1E=";
};
nativeBuildInputs = [
pnpm.configHook
nodejs
];
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-G95Iu268vnYwFsbD/kTy8n/Fu5Da9qXdy3LadbrsUHc=";
};
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 ];
};
})