diff --git a/pkgs/by-name/hi/hiddify-next/package.nix b/pkgs/by-name/hi/hiddify-next/package.nix new file mode 100644 index 000000000000000..f05b9c0337d999a --- /dev/null +++ b/pkgs/by-name/hi/hiddify-next/package.nix @@ -0,0 +1,50 @@ +{ + lib, + stdenv, + appimageTools, + fetchurl, +}: +let + pname = "hiddify-next"; + version = "1.1.1"; + name = "${pname}-${version}"; + src = fetchurl { + url = "https://github.com/hiddify/hiddify-next/releases/download/v${version}/Hiddify-Linux-x64.AppImage"; + hash = "sha256-T4BWxhJ7q13KE1rvvFsnXhs2XVEmNkFTJbJ4e8PCg+0="; + }; + hiddify = appimageTools.wrapType2 { + inherit pname version src; + + extraPkgs = pkgs: with pkgs; [ libepoxy ]; + }; +in +stdenv.mkDerivation rec { + inherit pname version; + + dontUnpack = true; + + appimageContents = appimageTools.extractType2 { inherit name src; }; + + installPhase = '' + runHook preInstall + install -Dm755 ${hiddify}/bin/${name} $out/bin/hiddify + install -Dm644 ${appimageContents}/hiddify.desktop $out/share/applications/hiddify.desktop + cp -a ${appimageContents}/usr/share/icons $out/share/ + + substituteInPlace $out/share/applications/hiddify.desktop \ + --replace 'LD_LIBRARY_PATH=usr/lib ' '''''' + runHook postInstall + ''; + + meta = with lib; { + description = "Multi-platform auto-proxy client (appimage version)"; + longDescription = '' + Multi-platform auto-proxy client, supporting Sing-box, X-ray, TUIC, Hysteria, Reality, Trojan, SSH etc. + ''; + homepage = "https://github.com/hiddify/hiddify-next"; + license = licenses.cc-by-nc-sa-40; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ wenjinnn ]; + mainProgram = "hiddify"; + }; +}