63 lines
1.2 KiB
Nix

{
lib,
bleak,
buildPythonPackage,
cryptography,
esptool,
fetchFromGitHub,
netifaces,
pyserial,
replaceVars,
setuptools,
versionCheckHook,
}:
buildPythonPackage rec {
pname = "rns";
version = "0.9.6";
pyproject = true;
src = fetchFromGitHub {
owner = "markqvist";
repo = "Reticulum";
tag = version;
hash = "sha256-TZXImMtAesLF6u6Yw/mvpQOjXK07UI4Op4fniq+pSu0=";
};
patches = [
(replaceVars ./unvendor-esptool.patch {
esptool = lib.getExe esptool;
})
];
build-system = [ setuptools ];
dependencies = [
bleak
cryptography
netifaces
pyserial
];
pythonImportsCheck = [ "RNS" ];
nativeCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/rncp";
versionCheckProgramArg = "--version";
meta = {
description = "Cryptography-based networking stack for wide-area networks";
homepage = "https://reticulum.network";
changelog = "https://github.com/markqvist/Reticulum/blob/${src.tag}/Changelog.md";
# Reticulum License
# https://github.com/markqvist/Reticulum/blob/master/LICENSE
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [
fab
qbit
];
};
}