Package ifstate

Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
magic_rb 2024-01-04 08:04:34 +01:00
parent d4568a6ead
commit ff7e1058b3
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
4 changed files with 84 additions and 1 deletions

View file

@ -105,6 +105,7 @@
overlays/show-files-to-be-deleted
overlays/rolling_datasets
overlays/ledger-compat
overlays/ifstate
inputs.uterranix.flakeModule
];
@ -210,7 +211,8 @@
tree-sitter-grammars
udp-over-tcp
itp
rolling_datasets;
rolling_datasets
ifstate;
# ds3os;
};

View file

@ -0,0 +1,7 @@
{inputs, ...}: {
flake.overlays.ifstate = final: prev: {
ifstate = final.python3.pkgs.callPackage ./ifstate.nix {
wgnlpy = final.python3.pkgs.callPackage ./wgnlpy.nix {};
};
};
}

View file

@ -0,0 +1,48 @@
{
lib,
fetchFromGitea,
buildPythonApplication,
jsonschema,
pyroute2,
pyyaml,
setproctitle,
libbpf,
withShell ? true,
pygments,
withWireguard ? true,
wgnlpy,
}: let
inherit
(lib)
optional
;
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 = version;
hash = "sha256-7FgvLsY9cm6+mZ8nfADdECeLXUJFYCTLoUCUEYKjsA8=";
};
}

View file

@ -0,0 +1,26 @@
{
fetchFromGitHub,
buildPythonPackage,
pyroute2,
cryptography,
}: let
version = "0.1.5";
in
buildPythonPackage {
pname = "wgnpy";
version = "v" + version;
doCheck = false;
propagatedBuildInputs = [
pyroute2
cryptography
];
src = fetchFromGitHub {
owner = "ArgosyLabs";
repo = "wgnlpy";
rev = "2dc844a48651d6b62d03fd2916e829bf56929c18";
hash = "sha256-5XAfBiKx4SqouA57PxmaCb0ea7mT2VeUI1tgnQE/ZwQ=";
};
}