mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
63fa53d97c
`treewide: replace stdenv.is with stdenv.hostPlatform.is`
50 lines
1018 B
Nix
50 lines
1018 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
pkg-config,
|
|
openssl,
|
|
nixosTests,
|
|
darwin,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage {
|
|
pname = "rathole";
|
|
version = "0.5.0-unstable-2024-06-06";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rapiz1";
|
|
repo = "rathole";
|
|
rev = "be14d124a22e298d12d92e56ef4fec0e51517998";
|
|
hash = "sha256-C0/G4JOZ4pTAvcKZhRHsGvlLlwAyWBQ0rMScLvaLSuA=";
|
|
};
|
|
|
|
cargoHash = "sha256-zlwIgzqpoEgYqZe4Gv8owJQ3m7UFgPA5joRMiyq+T/M=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs =
|
|
[
|
|
openssl
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ CoreServices ]);
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) rathole;
|
|
};
|
|
|
|
meta = {
|
|
description = "Reverse proxy for NAT traversal";
|
|
homepage = "https://github.com/rapiz1/rathole";
|
|
license = lib.licenses.asl20;
|
|
mainProgram = "rathole";
|
|
maintainers = with lib.maintainers; [
|
|
dit7ya
|
|
xokdvium
|
|
];
|
|
};
|
|
}
|