2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "narrowlink";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.2.4";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "narrowlink";
|
|
|
|
repo = "narrowlink";
|
|
|
|
rev = version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-priVl44VSxV+rCy/5H704I3CbNXDMP2BUguknl5Bguk=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-q15T0/2Xf8L6ZEphIjZzzcqcnkWMbv3zvBAd/Ofvnfg=";
|
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-02-29 20:09:43 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.IOKit
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
2024-02-29 20:09:43 +00:00
|
|
|
description = "A 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
|
|
|
};
|
|
|
|
}
|