
It is more common to specify hash as the last attribute of fetcher function args. Let's move fetcherVersion right above hash for all occurrences. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
nix-update-script,
|
|
nodejs,
|
|
pnpm_9,
|
|
stdenv,
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "metacubexd";
|
|
version = "1.187.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MetaCubeX";
|
|
repo = "metacubexd";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-Fgvt/qVrv+IIsyi9Sk6//KfF4eFPgHi0y55U2mKkITo=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pnpm_9.configHook
|
|
nodejs
|
|
];
|
|
|
|
pnpmDeps = pnpm_9.fetchDeps {
|
|
inherit (finalAttrs) pname version src;
|
|
fetcherVersion = 1;
|
|
hash = "sha256-Ct/YLnpZb0YBXVaghd5W1bmDcjVRladwQNRoLagHgJo=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
})
|