18 pname = "gui-for-clash";
20 src = fetchFromGitHub {
21 owner = "GUI-for-Cores";
22 repo = "GUI.for.Clash";
24 hash = "sha256-jNYMv3gPbZV2JlTV0v0NQ06HkXDzgHXuEdJrBgQ+p2g=";
26 frontend = stdenv.mkDerivation (finalAttrs: {
27 inherit pname version src;
34 pnpmDeps = pnpm.fetchDeps {
35 inherit (finalAttrs) pname version src;
36 sourceRoot = "${finalAttrs.src.name}/frontend";
37 hash = "sha256-RQtU61H1YklCgJrlyHALxUZp8OvVs2MgFThWBsYk2cs=";
40 sourceRoot = "${finalAttrs.src.name}/frontend";
60 description = "GUI program developed by vue3";
61 license = with lib.licenses; [ gpl3Plus ];
62 maintainers = with lib.maintainers; [ aucub ];
63 platforms = lib.platforms.linux;
68 inherit pname version src;
70 vendorHash = "sha256-rDbJOj8t/qu04Rd8J0LnXiBoIDmdzBQ9avAhImK7dFg=";
87 name = "GUI.for.Clash";
88 exec = "GUI.for.Clash";
89 icon = "GUI.for.Clash";
90 genericName = "GUI.for.Clash";
91 desktopName = "GUI.for.Clash";
102 cp -r ${frontend} $sourceRoot/frontend/dist
106 sed -i '/exePath, err := os.Executable()/,+3d' bridge/bridge.go
107 substituteInPlace bridge/bridge.go \
108 --replace-fail "Env.BasePath = filepath.Dir(exePath)" "" \
109 --replace-fail "Env.AppName = filepath.Base(exePath)" "Env.AppName = \"GUI.for.Clash\"
110 Env.BasePath = filepath.Join(os.Getenv(\"HOME\"), \".config\", Env.AppName)" \
111 --replace-fail 'exePath := Env.BasePath' 'exePath := "${placeholder "out"}/bin"'
117 wails build -m -s -trimpath -skipbindings -devtools -tags webkit2_40 -o GUI.for.Clash
125 mkdir -p $out/share/pixmaps
126 cp -r ./build/bin $out/bin
127 cp build/appicon.png $out/share/pixmaps/GUI.for.Clash.png
133 description = "Clash GUI program developed by vue3 + wails";
134 homepage = "https://github.com/GUI-for-Cores/GUI.for.Clash";
135 mainProgram = "GUI.for.Clash";
136 license = with lib.licenses; [ gpl3Plus ];
137 maintainers = with lib.maintainers; [ aucub ];
138 platforms = lib.platforms.linux;