depot/third_party/nixpkgs/pkgs/by-name/cl/clash-verge/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

66 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchurl
, dpkg
, wrapGAppsHook3
, autoPatchelfHook
, clash-meta
, openssl
, webkitgtk
, udev
, libayatana-appindicator
, nix-update-script
}:
stdenv.mkDerivation rec {
pname = "clash-verge";
version = "1.3.8";
src = fetchurl {
url = "https://github.com/zzzgydi/clash-verge/releases/download/v${version}/clash-verge_${version}_amd64.deb";
hash = "sha256-kOju4yaa+EKzFWDrk0iSJVoWkQMBjQG3hKLfAsqlsy8=";
};
nativeBuildInputs = [
dpkg
wrapGAppsHook3
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
'';
postFixup = ''
rm -f $out/bin/clash
ln -sf ${lib.getExe clash-meta} $out/bin/${clash-meta.meta.mainProgram}
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "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 ];
mainProgram = "clash-verge";
};
}