clash-verge-rev: 1.7.7 -> 2.0.2

This commit is contained in:
wxt
2024-12-21 21:37:43 +08:00
parent d54502b882
commit 059d94c566
6 changed files with 42 additions and 7628 deletions
File diff suppressed because it is too large Load Diff
+16 -30
View File
@@ -10,40 +10,27 @@
v2ray-domain-list-community,
copyDesktopItems,
makeDesktopItem,
libsoup,
}:
let
pname = "clash-verge-rev";
version = "1.7.7";
version = "2.0.2";
src = fetchFromGitHub {
owner = "clash-verge-rev";
repo = "clash-verge-rev";
rev = "v${version}";
hash = "sha256-5sd0CkUCV52wrBPo0IRIa1uqf2QNkjXuZhE33cZW3SY=";
rev = "refs/tags/v${version}";
hash = "sha256-QLvJO1JFHPFOsVxNi6SCu2QuJQ9hCsO1+WKOjZL944w=";
};
src-service = fetchFromGitHub {
owner = "clash-verge-rev";
repo = "clash-verge-service";
rev = "e74e419f004275cbf35a427337d3f8c771408f07"; # no meaningful tags in this repo. The only way is updating manully every time.
hash = "sha256-HyRTOqPj4SnV9gktqRegxOYz9c8mQHOX+IrdZlHhYpo=";
rev = "8b676086f2770e213cffea08ef31b54b886f8f11"; # no meaningful tags in this repo. The only way is updating manully every time.
hash = "sha256-vF26Bp52y2kNHwwtBjy3Of75qJpTriqvul29KmudHww=";
};
meta-unwrapped = {
description = "Clash GUI based on tauri";
homepage = "https://github.com/clash-verge-rev/clash-verge-rev";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
Guanran928
bot-wxt1221
];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
service-cargo-hash = "sha256-NBeHR6JvdCp06Ug/UEtLY2tu3iCmlsCU0x8umRbJXLU=";
service-cargo-hash = "sha256-pMOCifffUyBkcXC8inZFZeZVHeaOt0LAu2jZUGQ7QdM=";
service = callPackage ./service.nix {
inherit
@@ -51,8 +38,8 @@ let
src-service
service-cargo-hash
pname
meta
;
meta = meta-unwrapped;
};
webui = callPackage ./webui.nix {
@@ -60,22 +47,24 @@ let
version
src
pname
meta
npm-hash
;
meta = meta-unwrapped;
};
sysproxy-hash = "sha256-TEC51s/viqXUoEH9rJev8LdC2uHqefInNcarxeogePk=";
npm-hash = "sha256-zsgZhLC+XUzlCUKKGAJV5MlSpWsoLmAgMwKkmAkAX9Q=";
vendor-hash = "sha256-fk3OdJ1CKNHkeUjquJtJgM7PDyPpQ7tssDnFZHMbQHI=";
unwrapped = callPackage ./unwrapped.nix {
inherit
pname
version
src
sysproxy-hash
vendor-hash
webui
meta
libsoup
;
meta = meta-unwrapped;
};
meta = {
@@ -87,10 +76,7 @@ let
Guanran928
bot-wxt1221
];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
platforms = lib.platforms.linux;
};
in
stdenv.mkDerivation {
@@ -5,7 +5,6 @@
pkg-config,
openssl,
pname,
webkitgtk_4_0,
service-cargo-hash,
meta,
}:
@@ -18,12 +17,10 @@ rustPlatform.buildRustPackage {
nativeBuildInputs = [
pkg-config
rustPlatform.cargoSetupHook
];
buildInputs = [
openssl
webkitgtk_4_0
];
env = {
+20 -15
View File
@@ -3,13 +3,15 @@
version,
src,
libayatana-appindicator,
sysproxy-hash,
vendor-hash,
glib,
webui,
pkg-config,
libsoup,
rustPlatform,
makeDesktopItem,
meta,
webkitgtk_4_0,
webkitgtk_4_1,
openssl,
}:
rustPlatform.buildRustPackage {
@@ -17,24 +19,26 @@ rustPlatform.buildRustPackage {
pname = "${pname}-unwrapped";
sourceRoot = "${src.name}/src-tauri";
cargoLock = {
lockFile = ./Cargo-tauri.lock;
outputHashes = {
"sysproxy-0.3.0" = sysproxy-hash;
};
};
useFetchCargoVendor = true;
cargoHash = vendor-hash;
env = {
OPENSSL_NO_VENDOR = 1;
};
postPatch = ''
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
substituteInPlace ./tauri.conf.json \
--replace-fail '"distDir": "../dist",' '"distDir": "${webui}",' \
--replace-fail '"beforeBuildCommand": "pnpm run web:build"' '"beforeBuildCommand": ""'
sed -i -e '/externalBin/d' -e '/resources/d' tauri.conf.json
ls $cargoDepsCopy
substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
--replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
substituteInPlace $cargoDepsCopy/sysproxy-*/src/linux.rs \
--replace-fail '"gsettings"' '"${glib.bin}/bin/gsettings"'
substituteInPlace ./tauri.conf.json \
--replace-fail '"frontendDist": "../dist",' '"frontendDist": "${webui}",' \
--replace-fail '"beforeBuildCommand": "pnpm run web:build"' '"beforeBuildCommand": ""'
sed -i -e '/externalBin/d' -e '/resources/d' tauri.conf.json
sed -i -e '/sidecar/d' -e '/resources/d' tauri.linux.conf.json
'';
nativeBuildInputs = [
@@ -44,7 +48,8 @@ rustPlatform.buildRustPackage {
buildInputs = [
openssl
webkitgtk_4_0
libsoup
webkitgtk_4_1
];
postInstall = ''
+2 -1
View File
@@ -6,13 +6,14 @@
nodejs,
stdenv,
meta,
npm-hash,
}:
stdenv.mkDerivation {
inherit version src meta;
pname = "${pname}-webui";
pnpmDeps = pnpm.fetchDeps {
inherit pname version src;
hash = "sha256-ZKDhBdVyLIPf7CQaYUvj9dJd3lA3zsqroSjTyvOmunQ=";
hash = npm-hash;
};
nativeBuildInputs = [
+4
View File
@@ -18822,4 +18822,8 @@ with pkgs;
libpostalWithData = callPackage ../by-name/li/libpostal/package.nix {
withData = true;
};
clash-verge-rev = callPackage ../by-name/cl/clash-verge-rev/package.nix {
libsoup = libsoup_3;
};
}