2022-08-06 10:42:30 +02:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, CoreServices
|
|
|
|
}:
|
2022-12-04 22:59:41 +01:00
|
|
|
|
2022-08-06 10:42:30 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rathole";
|
2022-12-04 21:58:19 +01:00
|
|
|
version = "0.4.7";
|
2022-08-06 10:42:30 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rapiz1";
|
|
|
|
repo = pname;
|
2022-12-04 22:59:41 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-YauQg+P4Y8oO8Kn6FB3NxBI7PHoo/bjS38bM1lFeCH0=";
|
2022-08-06 10:42:30 +02:00
|
|
|
};
|
|
|
|
|
2022-12-04 22:59:41 +01:00
|
|
|
cargoHash = "sha256-OcPmHqjW79SKMET6J5HIwmR5vESh+PJcQjSMsqmnIb8=";
|
2022-08-06 10:42:30 +02:00
|
|
|
|
2022-12-04 22:59:41 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-08-06 10:42:30 +02:00
|
|
|
|
2022-12-04 22:59:41 +01:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
|
|
|
];
|
2022-08-06 10:42:30 +02:00
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-12-04 22:59:41 +01:00
|
|
|
description = "Reverse proxy for NAT traversal";
|
2022-08-06 10:42:30 +02:00
|
|
|
homepage = "https://github.com/rapiz1/rathole";
|
2022-12-04 22:59:41 +01:00
|
|
|
changelog = "https://github.com/rapiz1/rathole/releases/tag/v${version}";
|
2022-08-06 10:42:30 +02:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ dit7ya ];
|
|
|
|
};
|
|
|
|
}
|