2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "narrowlink";
|
2024-06-24 18:47:55 +00:00
|
|
|
version = "0.2.6";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "narrowlink";
|
|
|
|
repo = "narrowlink";
|
|
|
|
rev = version;
|
2024-06-24 18:47:55 +00:00
|
|
|
hash = "sha256-O66eihqSxwvrUfJj+VMrs7Vfndz2LPKQEnH7BDljvUg=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-06-24 18:47:55 +00:00
|
|
|
cargoHash = "sha256-LqPfgnN1J/OMAPsaBg9c5YSPbEDhOOOSujLthwIK79U=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
rustPlatform.bindgenHook
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-02-29 20:09:43 +00:00
|
|
|
darwin.apple_sdk.frameworks.IOKit
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Self-hosted solution to enable secure connectivity between devices across restricted networks like NAT or firewalls";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://github.com/narrowlink/narrowlink";
|
|
|
|
license = with lib.licenses; [ agpl3Only mpl20 ]; # the gateway component is AGPLv3, the rest is MPLv2
|
|
|
|
maintainers = with lib.maintainers; [ dit7ya ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "narrowlink";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
}
|