rns: add optional dependency lxmf (#528085)

This commit is contained in:
dotlambda
2026-06-08 17:48:25 +00:00
committed by GitHub
2 changed files with 36 additions and 3 deletions
+20 -1
View File
@@ -1 +1,20 @@
{ python3Packages }: with python3Packages; toPythonApplication rns
{
python3Packages,
}:
let
pythonPackages = python3Packages.overrideScope (
self: super: {
lxmf = super.lxmf.override {
propagateRns = false;
};
}
);
in
pythonPackages.toPythonApplication (
pythonPackages.rns.overridePythonAttrs (old: {
dependencies = old.dependencies ++ [
pythonPackages.lxmf
];
})
)
@@ -2,6 +2,9 @@
lib,
buildPythonPackage,
fetchFromGitHub,
# rns optionally depends on lxmf but we can't have two versions of rns in a closure
propagateRns ? false,
qrcode,
rns,
setuptools,
versionCheckHook,
@@ -24,11 +27,22 @@ buildPythonPackage (finalAttrs: {
pythonRelaxDeps = [ "rns" ];
dependencies = [ rns ];
buildInputs = lib.optionals (!propagateRns) [
rns
];
dependencies = [
qrcode
]
++ lib.optionals propagateRns [
rns
];
pythonImportsCheck = [ "LXMF" ];
nativeCheckInputs = [ versionCheckHook ];
nativeCheckInputs = lib.optionals propagateRns [
versionCheckHook
];
meta = {
description = "Lightweight Extensible Message Format for Reticulum";