dotfiles/overlays/ifstate/ifstate.nix
magic_rb c234160635
Border router, hela
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-09-04 22:39:43 +02:00

55 lines
976 B
Nix

{
lib,
fetchFromGitea,
buildPythonApplication,
jsonschema,
pyroute2,
pyyaml,
setproctitle,
libbpf,
withShell ? true,
pygments,
withWireguard ? true,
wgnlpy,
}: let
inherit
(lib)
optional
licenses
;
version = "1.11.4";
in
buildPythonApplication {
pname = "ifstate";
inherit version;
# preCheck = ''
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${libbpf}/lib
# '';
doCheck = false;
propagatedBuildInputs =
[
jsonschema
pyroute2
pyyaml
setproctitle
]
++ (optional withShell pygments)
++ (optional withWireguard wgnlpy);
src = fetchFromGitea {
domain = "codeberg.org";
owner = "liske";
repo = "ifstate";
rev = "74b8232ece29cebdd878d45371c3cdebfc33e4f6";
hash = "sha256-Ttjqi4vSpyq3FN/7xnNlaV+xwA0Ut1V2NRfs7qq0eFg=";
};
meta = {
license = licenses.gpl3;
mainProgram = "ifstatecli";
};
}