flclash: drop (#553620)

This commit is contained in:
Weijia Wang
2026-08-18 15:51:25 +00:00
committed by GitHub
5 changed files with 1 additions and 2519 deletions

View File

@@ -1,6 +0,0 @@
{
"launch_at_startup": "sha256-vr679QsLuIYyW9gaAHA4Uya4f6spWHViijDJSEnfrPw=",
"tray_manager": "sha256-0BGLObYc17BsQbuOaDLC9zN0d6f/l7tRZfEljixF4aU=",
"window_manager": "sha256-5gVHmQNMSQ2/bD5rNqBREDv71IviWgH8LZMqhUcIYN0=",
"yaml_writer": "sha256-QWi019rnHrFYN0uSCQeDzoPDs0hyf21Xx4o2XgUfcqg="
}

View File

@@ -1,205 +0,0 @@
{
lib,
fetchFromGitHub,
flutter344,
stdenv,
keybinder3,
libayatana-appindicator,
buildGoModule,
rustPlatform,
writeText,
makeDesktopItem,
copyDesktopItems,
autoPatchelfHook,
imagemagick,
}:
let
pname = "flclash";
version = "0.8.94";
src = fetchFromGitHub {
owner = "chen08209";
repo = "FlClash";
tag = "v${version}";
preFetch = ''
export GIT_CONFIG_COUNT=1
export GIT_CONFIG_KEY_0=url.https://github.com/.insteadOf
export GIT_CONFIG_VALUE_0=git@github.com:
'';
hash = "sha256-kLSyLsnTzYspPQ2IZRGdUjHouFKvZWTvuYdcGxLWPdw=";
fetchSubmodules = true;
};
meta = {
description = "Proxy client based on ClashMeta, simple and easy to use";
homepage = "https://github.com/chen08209/FlClash";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ VZstless ];
};
core = buildGoModule {
pname = "core";
inherit version src meta;
modRoot = "core";
vendorHash = "sha256-sf8PXdkqgq/0hxbxP26a73XLT88tGiH5NDV6LoiHuZM=";
env.CGO_ENABLED = 0;
buildPhase = ''
runHook preBuild
mkdir --parents $out/bin
go build -ldflags="-w -s" -tags=with_gvisor -o $out/bin/FlClashCore
runHook postBuild
'';
};
rustApi = rustPlatform.buildRustPackage {
pname = "rustApi";
inherit version src meta;
sourceRoot = "${src.name}/plugins/rust_api/rust";
cargoHash = "sha256-8zY3VkbEatU78qUTDIocasw4ca/jC94NUjDvcKnkxAA=";
installPhase = ''
runHook preInstall
mkdir --parents $out/lib
cp target/*/release/librust_api.so $out/lib/
runHook postInstall
'';
};
in
flutter344.buildFlutterApplication {
inherit pname version src;
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = lib.importJSON ./git-hashes.json;
nativeBuildInputs = [
copyDesktopItems
autoPatchelfHook
imagemagick
];
buildInputs = [
keybinder3
libayatana-appindicator
];
flutterBuildFlags = [ "--dart-define=APP_ENV=stable" ];
# RustLib.init() loads librust_api.so with dlopen(), which ignores
# RUNPATH and only consults LD_LIBRARY_PATH
extraWrapProgramArgs = "--prefix LD_LIBRARY_PATH : $out/app/flclash/lib";
desktopItems = [
(makeDesktopItem {
name = "flclash";
exec = "FlClash %U";
icon = "flclash";
genericName = "FlClash";
desktopName = "FlClash";
categories = [ "Network" ];
startupWMClass = "com.follow.clash";
keywords = [
"FlClash"
"Clash"
"ClashMeta"
"Proxy"
];
})
];
customSourceBuilders = {
setup =
{ version, src, ... }:
stdenv.mkDerivation {
pname = "setup";
inherit version src;
inherit (src) passthru;
postPatch =
let
cmakeLists = writeText "CMakeLists.txt" ''
cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME "setup")
project(''${PROJECT_NAME} LANGUAGES CXX)
get_filename_component(PROJECT_ROOT "''${CMAKE_SOURCE_DIR}" DIRECTORY)
install(PROGRAMS "''${PROJECT_ROOT}/libclash/linux/FlClashCore"
DESTINATION "''${CMAKE_BINARY_DIR}/bundle"
COMPONENT Runtime
)
'';
in
''
cp ${cmakeLists} plugins/setup/linux/CMakeLists.txt
'';
installPhase = ''
runHook preInstall
mkdir --parents $out/plugins
cp --recursive plugins/setup $out/plugins/
runHook postInstall
'';
};
rust_api =
{ version, src, ... }:
stdenv.mkDerivation {
pname = "rust_api";
inherit version src;
inherit (src) passthru;
postPatch =
let
fakeCargokitCmake = writeText "FakeCargokit.cmake" ''
function(apply_cargokit target manifest_dir lib_name any_symbol_name)
set("''${target}_cargokit_lib" ${rustApi}/lib/librust_api.so PARENT_SCOPE)
endfunction()
'';
in
''
cp ${fakeCargokitCmake} plugins/rust_api/cargokit/cmake/cargokit.cmake
'';
installPhase = ''
runHook preInstall
mkdir --parents $out/plugins
cp --recursive plugins/rust_api $out/plugins/
runHook postInstall
'';
};
};
preBuild = ''
mkdir --parents libclash/linux
cp ${core}/bin/FlClashCore libclash/linux/FlClashCore
'';
postInstall = ''
mkdir --parents $out/share/icons/hicolor/512x512/apps
magick assets/images/icon.png -resize 512x512 $out/share/icons/hicolor/512x512/apps/flclash.png
'';
passthru = {
inherit core rustApi;
updateScript = ./update.sh;
};
meta = meta // {
mainProgram = "FlClash";
platforms = lib.platforms.linux;
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused jq yq-go nix bash nix-update
set -eou pipefail
PACKAGE_DIR=$(realpath "$(dirname "$0")")
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 eval --file . --raw flclash.version)
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "package is up-to-date: $currentVersion"
exit 0
fi
nix-update --subpackage core --subpackage rustApi --use-github-releases flclash
curl --fail --location --silent https://raw.githubusercontent.com/chen08209/FlClash/${latestTag}/pubspec.lock | yq eval --output-format=json --prettyPrint >$PACKAGE_DIR/pubspec.lock.json
$(nix eval --file . dart.fetchGitHashesScript) --input $PACKAGE_DIR/pubspec.lock.json --output $PACKAGE_DIR/git-hashes.json

View File

@@ -836,6 +836,7 @@ mapAliases {
flat-remix-gtk = throw "'flat-remix-gtk' has been removed because it depended on 'gtk-engine-murrine', which was removed because it was unmaintained upstream and depended on GTK 2."; # Added 2026-07-22
flatbuffers_2_0 = throw "'flatbuffers_2_0' has been renamed to/replaced by 'flatbuffers'"; # Converted to throw 2025-10-27
flattenReferencesGraph = warnAlias "'flattenReferencesGraph' has been renamed to 'flatten-references-graph'" flatten-references-graph; # Added 2026-02-08
flclash = throw "'flclash' has been removed due to low number of users and lack of maintenance."; # Added 2026-08-17
flint3 = flint; # Added 2025-09-21
floorp = throw "floorp has been replaced with floorp-bin, as building from upstream sources has become unfeasible starting with version 12.x"; # Added 2025-09-06
floorp-unwrapped = throw "floorp-unwrapped has been replaced with floorp-bin-unwrapped, as building from upstream sources has become unfeasible starting with version 12.x"; # Added 2025-09-06