clash-rs: 0.8.2 -> 0.9.0 (#440072)

This commit is contained in:
Yohann Boniface
2025-09-10 21:54:50 +00:00
committed by GitHub
2 changed files with 68 additions and 3 deletions
+50
View File
@@ -0,0 +1,50 @@
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1462,7 +1462,7 @@
"sha2",
"shadowquic",
"shadowsocks",
- "smoltcp 0.12.0 (git+https://github.com/smoltcp-rs/smoltcp.git?rev=ac32e64)",
+ "smoltcp 0.12.0",
"socket2 0.6.0",
"tempfile",
"thiserror 2.0.15",
@@ -4439,7 +4439,7 @@
"etherparse 0.16.0",
"futures",
"rand 0.8.5",
- "smoltcp 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smoltcp 0.12.0",
"spin 0.9.8",
"tokio",
"tokio-util",
@@ -6892,20 +6892,6 @@
]
[[package]]
-name = "smoltcp"
-version = "0.12.0"
-source = "git+https://github.com/smoltcp-rs/smoltcp.git?rev=ac32e64#ac32e643a4b7e09161193071526b3ca5a0deedb5"
-dependencies = [
- "bitflags 1.3.2",
- "byteorder",
- "cfg-if",
- "defmt 0.3.100",
- "heapless",
- "log",
- "managed",
-]
-
-[[package]]
name = "socket2"
version = "0.4.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9231,7 +9217,7 @@
"netstack-lwip",
"netstack-smoltcp",
"rand 0.9.2",
- "smoltcp 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "smoltcp 0.12.0",
"socket2 0.6.0",
"tokio",
"tracing",
+18 -3
View File
@@ -6,24 +6,32 @@
versionCheckHook,
cmake,
pkg-config,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "clash-rs";
version = "0.8.2";
version = "0.9.0";
src = fetchFromGitHub {
owner = "Watfaq";
repo = "clash-rs";
tag = "v${finalAttrs.version}";
hash = "sha256-HkIsflsLTQdvetgamLt6LbYxOpv1+FQ/e/PzJjKOfq4=";
hash = "sha256-OwoDvcGpuU2x6O3+rBJSXGS2VoeFt/oVgFWUaCUyC8E=";
};
cargoHash = "sha256-Qh/YxNO/DtVBj6Eiloc3+Fs+dQqvAXSe+5lCer0F2zs=";
cargoHash = "sha256-HKW6bOkHkBINwA2tgaKHEozKzT4n54roj6W989JUoAQ=";
cargoPatches = [ ./Cargo.patch ];
patches = [
./unbounded-shifts.patch
];
postPatch = ''
substituteInPlace clash-lib/Cargo.toml \
--replace-fail ', git = "https://github.com/smoltcp-rs/smoltcp.git", rev = "ac32e64"' ""
'';
nativeBuildInputs = [
cmake
pkg-config
@@ -56,6 +64,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
doInstallCheck = true;
versionCheckProgramArg = "--version";
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^v([0-9.]+)$"
];
};
meta = {
description = "Custom protocol, rule based network proxy software";
homepage = "https://github.com/Watfaq/clash-rs";