Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: nekoray #244451

Closed
ehsan2003 opened this issue Jul 20, 2023 · 6 comments · Fixed by #300794
Closed

Package request: nekoray #244451

ehsan2003 opened this issue Jul 20, 2023 · 6 comments · Fixed by #300794
Labels
0.kind: packaging request Request for a new package to be added

Comments

@ehsan2003
Copy link

Project description
Qt based cross-platform GUI proxy configuration manager (backend: v2ray / sing-box)

proxy configuration manager
Metadata

@ehsan2003 ehsan2003 added the 0.kind: packaging request Request for a new package to be added label Jul 20, 2023
@ehsan2003
Copy link
Author

for anyone waiting for this to be available I suggest v2raya
it has a web based gui
this is how I have it in my nixos configuration

systemd.services.v2raya = {
    enable = true;
    description = "v2rayA gui client";
    after = [ "network.target" ];
    serviceConfig = {
      Restart = "always";
      ExecStart = "${unstable.v2raya}/bin/v2rayA";
    };
    path = with pkgs; [ iptables bash ];
    wantedBy = [ "multi-user.target" ];

  }

@jys1670
Copy link

jys1670 commented Dec 22, 2023

I didn't manage to build it from source, however patching binary seems to work as temporary solution

{
  stdenv,
  fetchzip,
  makeDesktopItem,
  autoPatchelfHook,
  copyDesktopItems,
  qtbase,
  qtsvg,
  qttools,
  qtx11extras,
  wrapQtAppsHook,
}:
stdenv.mkDerivation rec {
  pname = "nekoray";
  version = "3.26";
  date = "2023-12-09";

  src = fetchzip {
    url = "https://github.com/MatsuriDayo/nekoray/releases/download/${version}/nekoray-${version}-${date}-linux64.zip";
    hash = "sha256-Wp97qT3VBlSxK2qAVLxm041NR0c5vi8SSI/4VdwvQTY=";
  };

  desktopItems = [
    (makeDesktopItem {
      name = pname;
      desktopName = pname;
      exec = "nekoray";
      icon = "nekoray";
      comment = "Qt based cross-platform GUI proxy configuration manager";
      categories = ["Network" "Utility"];
    })
  ];

  dontWrapQtApps = true;

  nativeBuildInputs = [autoPatchelfHook copyDesktopItems wrapQtAppsHook];
  buildInputs = [
    qtbase
    qtsvg
    qttools
    qtx11extras
  ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/{share/icons/hicolor/128x128/apps,usr/lib/nekoray,bin}
    install -Dm755 ./{nekobox_core,nekoray_core,nekoray} $out/usr/lib/nekoray/
    install -Dm644 ./{geosite.db,geosite.dat,geoip.db,geoip.dat} $out/usr/lib/nekoray/
    install -Dm644 ./nekoray.png $out/share/icons/hicolor/128x128/apps/

    wrapQtApp $out/usr/lib/nekoray/nekoray \
      --add-flags "-- -appdata"

    mv $out/usr/lib/nekoray/nekoray $out/bin/nekoray

    runHook postInstall
  '';
}

It can be used as overlay, for example nekoray = prev.libsForQt5.callPackage ./nekoray.nix {};

@Chapped1888
Copy link

Can someone explain how to exactly use this as an overlay? I am using flakes btw.

@Aleksanaa
Copy link
Member

I've added a tracking list here: #287770

@TomaSajt
Copy link
Contributor

TomaSajt commented Apr 1, 2024

I have succeeded in compiling the package (the go parts too), now I'm in the process of putting it all together. Hopefully I don't get stuck just before the end.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/help-setting-up-v2ray-no-outbound-connection/55626/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: packaging request Request for a new package to be added
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants