From 920a8c146a1d7ab2232e1fadc7246028a85c6e18 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 16 Jun 2026 08:02:40 +0200 Subject: [PATCH] reticulated: init at 1.0.2 --- pkgs/by-name/re/reticulated/package.nix | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/re/reticulated/package.nix diff --git a/pkgs/by-name/re/reticulated/package.nix b/pkgs/by-name/re/reticulated/package.nix new file mode 100644 index 000000000000..798e02fca3c6 --- /dev/null +++ b/pkgs/by-name/re/reticulated/package.nix @@ -0,0 +1,65 @@ +{ + lib, + python3Packages, + fetchFromGitHub, + nix-update-script, +}: + +python3Packages.buildPythonApplication (finalAttrs: { + pname = "reticulated"; + version = "1.0.2"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "RFnexus"; + repo = "reticulated"; + tag = finalAttrs.version; + hash = "sha256-55eK9AObUw8JLn4sNC5O8dNrfscwTwQpkVQAR+O9Lcw="; + }; + + postPatch = '' + substituteInPlace sim/config.py \ + --replace-fail 'os.path.join(BASE_DIR, "web")' '"${placeholder "out"}/share/web"' + ''; + + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ + fastapi + lxmf + rns + uvicorn + websockets + ]; + + postInstall = '' + mkdir -p "$out/share" + cp -r web "$out/share/" + ''; + + postFixup = '' + wrapProgram $out/bin/reticulated \ + --set PYTHONPATH $PYTHONPATH \ + --set SIM_DATA_DIR "/tmp" + ''; + + pythonImportsCheck = [ "sim" ]; + + # No --version flag and no Python tests + doCheck = false; + + passthru.updateScript = nix-update-script { }; + + meta = { + changelog = "https://github.com/RFnexus/reticulated/releases/tag/${finalAttrs.src.tag}"; + description = "Reticulum Network Stack Simulator"; + homepage = "https://github.com/RFnexus/reticulated"; + license = lib.licenses.unlicense; + maintainers = with lib.maintainers; [ drupol ]; + mainProgram = "reticulated"; + platforms = lib.platforms.all; + }; +})