From 23be01302a945b6c37af5bd32d146e31f12aa016 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Sat, 9 Nov 2024 04:35:59 +0800 Subject: [PATCH] flclash: libclash add meta --- pkgs/by-name/fl/flclash/package.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/by-name/fl/flclash/package.nix b/pkgs/by-name/fl/flclash/package.nix index d72a16afc6a1..d47181aa4f4d 100644 --- a/pkgs/by-name/fl/flclash/package.nix +++ b/pkgs/by-name/fl/flclash/package.nix @@ -30,10 +30,20 @@ let vendorHash = "sha256-K+PrLFvDHyaxf1NKzcqf0qmfQwT8rctScv1CN+TxY0M="; buildPhase = '' runHook preBuild + mkdir -p $out/lib go build -ldflags="-w -s" -tags=with_gvisor -buildmode=c-shared -o $out/lib/libclash.so + runHook postBuild ''; + + meta = { + description = "Multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free"; + homepage = "https://github.com/chen08209/FlClash"; + license = with lib.licenses; [ gpl3Plus ]; + maintainers = with lib.maintainers; [ aucub ]; + platforms = lib.platforms.linux; + }; }; in flutter.buildFlutterApplication { @@ -60,7 +70,9 @@ flutter.buildFlutterApplication { patchPhase = '' runHook prePatch + substituteInPlace lib/clash/core.dart --replace-fail 'DynamicLibrary.open("libclash.so")' 'DynamicLibrary.open("${libclash}/lib/libclash.so")' + runHook postPatch '';