From c6e32bcabfe0018100708f9b94d90bb537f76b98 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 5 Jul 2026 09:51:52 +0200 Subject: [PATCH] rnsapi: init at 0-unstable-2026-07-06 --- pkgs/by-name/rn/rnsapi/package.nix | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pkgs/by-name/rn/rnsapi/package.nix diff --git a/pkgs/by-name/rn/rnsapi/package.nix b/pkgs/by-name/rn/rnsapi/package.nix new file mode 100644 index 000000000000..4d1543986eb3 --- /dev/null +++ b/pkgs/by-name/rn/rnsapi/package.nix @@ -0,0 +1,53 @@ +{ + lib, + python3Packages, + fetchFromGitHub, + nix-update-script, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "rnsapi"; + version = "0-unstable-2026-07-06"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "attermann"; + repo = "ReticulumAPI"; + rev = "9dc2a562c7e8695fb08c5204a403052a19af03d2"; + hash = "sha256-8WsQyJtxkXVaObBHQCQ2VrqJUApSyePL1IVUoTE4XPk="; + }; + + build-system = [ + python3Packages.setuptools + ]; + + dependencies = with python3Packages; [ + aiohttp + cryptography + rns + ]; + + __darwinAllowLocalNetworking = true; + + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + pytest-aiohttp + pytest-asyncio + pytest-timeout + ]; + + pythonImportsCheck = [ + "rnsapi" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "REST + WebSocket API daemon that exposes the full Reticulum Network Stack (RNS) service over HTTP(S) and WS(S)"; + homepage = "https://github.com/attermann/ReticulumAPI"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ drupol ]; + mainProgram = "reticulum-api"; + }; +})