2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, dpkg
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2023-03-04 12:14:45 +00:00
|
|
|
, autoPatchelfHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, clash-meta
|
2023-03-04 12:14:45 +00:00
|
|
|
, openssl
|
|
|
|
, webkitgtk
|
|
|
|
, udev
|
|
|
|
, libayatana-appindicator
|
2024-04-21 15:54:59 +00:00
|
|
|
, nix-update-script
|
2023-03-04 12:14:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "clash-verge";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "1.3.8";
|
2023-03-04 12:14:45 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/zzzgydi/clash-verge/releases/download/v${version}/clash-verge_${version}_amd64.deb";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-kOju4yaa+EKzFWDrk0iSJVoWkQMBjQG3hKLfAsqlsy8=";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dpkg
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2023-03-04 12:14:45 +00:00
|
|
|
autoPatchelfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
webkitgtk
|
|
|
|
stdenv.cc.cc
|
|
|
|
];
|
|
|
|
|
|
|
|
runtimeDependencies = [
|
|
|
|
(lib.getLib udev)
|
|
|
|
libayatana-appindicator
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mv usr/* $out
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postFixup = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
rm -f $out/bin/clash
|
|
|
|
ln -sf ${lib.getExe clash-meta} $out/bin/${clash-meta.meta.mainProgram}
|
2023-05-24 13:37:59 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Clash GUI based on tauri";
|
|
|
|
homepage = "https://github.com/zzzgydi/clash-verge";
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
|
|
maintainers = with maintainers; [ zendo ];
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "clash-verge";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
}
|