77 buildGoModule ,
88 makeDesktopItem ,
99 copyDesktopItems ,
10- wrapGAppsHook3 ,
1110 autoPatchelfHook ,
1211} :
12+
1313let
1414 pname = "flclash" ;
1515 version = "0.8.70" ;
16+
1617 src =
1718 ( fetchFromGitHub {
1819 owner = "chen08209" ;
2627 GIT_CONFIG_KEY_0 = "url.https://github.com/.insteadOf" ;
2728 GIT_CONFIG_VALUE_0 = "[email protected] :" ; 2829 } ) ;
30+
31+ metaCommon = {
32+ description = "Multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free" ;
33+ homepage = "https://github.com/chen08209/FlClash" ;
34+ license = with lib . licenses ; [ gpl3Plus ] ;
35+ maintainers = with lib . maintainers ; [ ] ;
36+ } ;
37+
2938 libclash = buildGoModule {
30- inherit pname version src ;
39+ inherit version src ;
40+ pname = "libclash" ;
3141
32- modRoot = "./ core" ;
42+ modRoot = "core" ;
3343
3444 vendorHash = "sha256-yam3DgY/dfwIRc7OvFltwX29x6xGlrrsK4Oj6oaGYRw=" ;
3545
4454 runHook postBuild
4555 '' ;
4656
47- meta = {
48- description = "Multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free" ;
49- homepage = "https://github.com/chen08209/FlClash" ;
50- license = with lib . licenses ; [ gpl3Plus ] ;
51- maintainers = with lib . maintainers ; [ ] ;
52- } ;
57+ meta = metaCommon ;
5358 } ;
5459in
5560flutter324 . buildFlutterApplication {
@@ -59,7 +64,6 @@ flutter324.buildFlutterApplication {
5964
6065 nativeBuildInputs = [
6166 copyDesktopItems
62- wrapGAppsHook3
6367 autoPatchelfHook
6468 ] ;
6569
@@ -88,22 +92,21 @@ flutter324.buildFlutterApplication {
8892 ] ;
8993
9094 preBuild = ''
91- mkdir -p ./ libclash/linux/
92- cp ${ libclash } /bin/FlClashCore ./ libclash/linux/FlClashCore
95+ mkdir -p libclash/linux
96+ cp ${ libclash } /bin/FlClashCore libclash/linux/FlClashCore
9397 '' ;
9498
9599 postInstall = ''
96- install -Dm644 ./ assets/images/icon.png $out/share/pixmaps/flclash.png
100+ install -Dm644 assets/images/icon.png $out/share/pixmaps/flclash.png
97101 '' ;
98102
99- passthru . updateScript = ./update.sh ;
103+ passthru = {
104+ inherit libclash ;
105+ updateScript = ./update.sh ;
106+ } ;
100107
101- meta = {
102- description = "Multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free" ;
103- homepage = "https://github.com/chen08209/FlClash" ;
108+ meta = metaCommon // {
104109 mainProgram = "FlClash" ;
105- license = with lib . licenses ; [ gpl3Plus ] ;
106- maintainers = with lib . maintainers ; [ ] ;
107110 platforms = lib . platforms . linux ;
108111 } ;
109112}
0 commit comments