summary refs log tree commit diff
path: root/pkgs/tools/networking/rathole/default.nix
blob: ceaf89ef92e96428eec37784931c5d592270be16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, openssl
, CoreServices
}:
rustPlatform.buildRustPackage rec {
  pname = "rathole";
  version = "0.4.4";

  src = fetchFromGitHub {
    owner = "rapiz1";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-qhkgXS+Rku9OcFgFbHfELcjQmIHNvi3sC4bh5LKYzJQ=";
  };

  cargoSha256 = "sha256-3WY+VIRycqFmkVA+NdbU4glEkZecRM5eKI/reyNWVao=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin [ CoreServices ];

  __darwinAllowLocalNetworking = true;

  meta = with lib; {
    description = "A lightweight and high-performance reverse proxy for NAT traversal, written in Rust";
    homepage = "https://github.com/rapiz1/rathole";
    license = licenses.asl20;
    maintainers = with maintainers; [ dit7ya ];
  };
}