depot/third_party/nixpkgs/pkgs/by-name/cl/clash-verge-rev/webui.nix
Default email 24fdeddc0a Project import generated by Copybara.
GitOrigin-RevId: 2768c7d042a37de65bb1b5b3268fc987e534c49d
2024-10-23 09:41:50 +03:00

44 lines
815 B
Nix

{
version,
src,
pname,
pnpm,
nodejs,
stdenv,
meta,
}:
stdenv.mkDerivation {
inherit version src meta;
pname = "${pname}-webui";
pnpmDeps = pnpm.fetchDeps {
inherit pname version src;
hash = "sha256-ZKDhBdVyLIPf7CQaYUvj9dJd3lA3zsqroSjTyvOmunQ=";
};
nativeBuildInputs = [
nodejs
pnpm.configHook
];
postPatch = ''
chmod -R +644 -- ./src/components/setting/mods/clash-core-viewer.tsx
chmod -R +644 -- ./src/components/setting/mods
sed -i -e '/Mihomo Alpha/d' ./src/components/setting/mods/clash-core-viewer.tsx
'';
buildPhase = ''
runHook preBuild
node --max_old_space_size=1024000 ./node_modules/vite/bin/vite.js build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
}