56 lines
1 KiB
Nix
56 lines
1 KiB
Nix
|
{
|
||
|
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 ];
|
||
|
};
|
||
|
})
|