2024-01-04 08:04:34 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitea,
|
|
|
|
buildPythonApplication,
|
|
|
|
jsonschema,
|
|
|
|
pyroute2,
|
|
|
|
pyyaml,
|
|
|
|
setproctitle,
|
|
|
|
libbpf,
|
|
|
|
withShell ? true,
|
|
|
|
pygments,
|
|
|
|
withWireguard ? true,
|
|
|
|
wgnlpy,
|
|
|
|
}: let
|
|
|
|
inherit
|
|
|
|
(lib)
|
|
|
|
optional
|
2024-03-02 21:54:46 +01:00
|
|
|
licenses
|
2024-01-04 08:04:34 +01:00
|
|
|
;
|
2024-10-27 12:44:44 +01:00
|
|
|
version = "1.13.0";
|
2024-01-04 08:04:34 +01:00
|
|
|
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";
|
2024-10-27 12:44:44 +01:00
|
|
|
rev = version;
|
|
|
|
hash = "sha256-CHTshUEyRiGYKM/5HQLW7knT83bWy2ZtE+t8gNtxLrE=";
|
2024-03-02 21:54:46 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = licenses.gpl3;
|
|
|
|
mainProgram = "ifstatecli";
|
2024-01-04 08:04:34 +01:00
|
|
|
};
|
|
|
|
}
|