flclash: 0.8.87 -> 0.8.90 (#445455)

This commit is contained in:
Sandro
2025-11-07 17:39:03 +00:00
committed by GitHub
5 changed files with 331 additions and 235 deletions
+14 -16
View File
@@ -1,7 +1,7 @@
{
lib,
fetchFromGitHub,
flutter332,
flutter335,
keybinder3,
libayatana-appindicator,
buildGoModule,
@@ -12,14 +12,14 @@
let
pname = "flclash";
version = "0.8.87";
version = "0.8.90";
src =
(fetchFromGitHub {
owner = "chen08209";
repo = "FlClash";
tag = "v${version}";
hash = "sha256-vGRq9Kc6XU6r3huIGAKoh5x46fFS8jmXgus9WgpvG3A=";
hash = "sha256-wEgWjzdP7HeWgDacaP9fYNczG9BrTN790AQ5aj9scwM=";
fetchSubmodules = true;
}).overrideAttrs
(_: {
@@ -28,20 +28,20 @@ let
GIT_CONFIG_VALUE_0 = "git@github.com:";
});
metaCommon = {
description = "Multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free";
meta = {
description = "Proxy client based on ClashMeta, simple and easy to use";
homepage = "https://github.com/chen08209/FlClash";
license = with lib.licenses; [ gpl3Plus ];
maintainers = [ ];
};
libclash = buildGoModule {
inherit version src;
pname = "libclash";
core = buildGoModule {
pname = "core";
inherit version src meta;
modRoot = "core";
vendorHash = "sha256-Uc+RvpW3vndPFnM7yhqrNTEexAPaolCk8YK8u/+55RQ=";
vendorHash = "sha256-5oYJMcyKh8CpMLOLch5/svwa148hY4rnSR5inTRNK4M=";
env.CGO_ENABLED = 0;
@@ -53,11 +53,9 @@ let
runHook postBuild
'';
meta = metaCommon;
};
in
flutter332.buildFlutterApplication {
flutter335.buildFlutterApplication {
inherit pname version src;
pubspecLock = lib.importJSON ./pubspec.lock.json;
@@ -98,19 +96,19 @@ flutter332.buildFlutterApplication {
preBuild = ''
mkdir -p libclash/linux
cp ${libclash}/bin/FlClashCore libclash/linux/FlClashCore
cp ${core}/bin/FlClashCore libclash/linux/FlClashCore
'';
postInstall = ''
install -Dm644 assets/images/icon.png $out/share/pixmaps/flclash.png
install -D --mode=0644 assets/images/icon.png $out/share/pixmaps/flclash.png
'';
passthru = {
inherit libclash;
inherit core;
updateScript = ./update.sh;
};
meta = metaCommon // {
meta = meta // {
mainProgram = "FlClash";
platforms = lib.platforms.linux;
};
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -1,20 +1,20 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p curl gnused jq yq nix bash coreutils nix-update
#!nix-shell -i bash -p curl gnused jq yq-go nix bash nix-update
set -eou pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
PACKAGE_DIR=$(realpath "$(dirname "$0")")
latestTag=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} -sL https://api.github.com/repos/chen08209/FlClash/releases/latest | jq --raw-output .tag_name)
latestTag=$(curl --fail --location --silent ${GITHUB_TOKEN:+--user ":$GITHUB_TOKEN"} https://api.github.com/repos/chen08209/FlClash/releases/latest | jq --raw-output .tag_name)
latestVersion=$(echo "$latestTag" | sed 's/^v//')
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; flclash.version or (lib.getVersion flclash)" | tr -d '"')
currentVersion=$(nix eval --file . --raw flclash.version)
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "package is up-to-date: $currentVersion"
exit 0
fi
nix-update --subpackage libclash flclash
nix-update --subpackage core --use-github-releases flclash
curl https://raw.githubusercontent.com/chen08209/FlClash/${latestTag}/pubspec.lock | yq . >$ROOT/pubspec.lock.json
curl --fail --location --silent https://raw.githubusercontent.com/chen08209/FlClash/${latestTag}/pubspec.lock | yq eval --output-format=json --prettyPrint >$PACKAGE_DIR/pubspec.lock.json
@@ -7,6 +7,7 @@
flutter_vodozemac = callPackage ./flutter_vodozemac { };
flutter_volume_controller = callPackage ./flutter_volume_controller { };
handy_window = callPackage ./handy-window { };
hotkey_manager_linux = callPackage ./hotkey_manager_linux { };
matrix = callPackage ./matrix { };
media_kit_libs_linux = callPackage ./media_kit_libs_linux { };
olm = callPackage ./olm { };
@@ -0,0 +1,27 @@
{
stdenv,
}:
{ version, src, ... }:
stdenv.mkDerivation {
pname = "hotkey_manager_linux";
inherit version src;
inherit (src) passthru;
postPatch = ''
pushd ${src.passthru.packageRoot}
substituteInPlace linux/hotkey_manager_linux_plugin.cc \
--replace-fail "const char* identifier;" "const char* identifier = nullptr;" \
--replace-fail "const char* keystring;" "const char* keystring = nullptr;"
popd
'';
installPhase = ''
runHook preInstall
cp --recursive . "$out"
runHook postInstall
'';
}