mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
ifstate: 2.1.0 -> 2.2.0 (#464402)
This commit is contained in:
@@ -123,9 +123,8 @@ in
|
||||
type = lib.types.package;
|
||||
default = cfg.package.override {
|
||||
withConfigValidation = false;
|
||||
withWireguard = false;
|
||||
};
|
||||
defaultText = lib.literalExpression "pkgs.ifstate.override { withConfigValidation = false; withWireguard = false; }";
|
||||
defaultText = lib.literalExpression "pkgs.ifstate.override { withConfigValidation = false; }";
|
||||
description = "The initrd IfState package to use.";
|
||||
};
|
||||
|
||||
@@ -195,12 +194,6 @@ in
|
||||
})
|
||||
(lib.mkIf initrdCfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
initrdCfg.package.passthru.features.withWireguard
|
||||
|| !(builtins.elem "wireguard" initrdInterfaceTypes);
|
||||
message = "IfState initrd package is configured without the `wireguard` feature, but wireguard interfaces are configured. Please see the `boot.initrd.network.ifstate.package` option.";
|
||||
}
|
||||
{
|
||||
assertion = initrdCfg.allowIfstateToDrasticlyIncreaseInitrdSize;
|
||||
message = "IfState in initrd drastically increases the size of initrd, your boot partition may be too small and/or you may have significantly fewer generations. By setting boot.initrd.network.initrd.allowIfstateToDrasticlyIncreaseInitrdSize to true, you acknowledge this fact and keep it in mind when reporting issues.";
|
||||
|
||||
@@ -10,20 +10,19 @@ let
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
namespaces.outside.interfaces.eth1 = {
|
||||
addresses = [ "2001:0db8:a::${builtins.toString id}/64" ];
|
||||
link = {
|
||||
state = "up";
|
||||
kind = "physical";
|
||||
};
|
||||
};
|
||||
interfaces = {
|
||||
eth1 = {
|
||||
addresses = [ "2001:0db8:a::${builtins.toString id}/64" ];
|
||||
link = {
|
||||
state = "up";
|
||||
kind = "physical";
|
||||
};
|
||||
};
|
||||
wg0 = {
|
||||
addresses = [ "2001:0db8:b::${builtins.toString id}/64" ];
|
||||
link = {
|
||||
state = "up";
|
||||
kind = "wireguard";
|
||||
bind_netns = "outside";
|
||||
};
|
||||
wireguard = {
|
||||
private_key = "!include ${pkgs.writeText "wg_priv.key" wgPriv}";
|
||||
|
||||
@@ -10,17 +10,16 @@
|
||||
withBpf ? false,
|
||||
withConfigValidation ? true,
|
||||
withShellColor ? false,
|
||||
withWireguard ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2.1.0";
|
||||
version = "2.2.0";
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "liske";
|
||||
repo = "ifstate";
|
||||
tag = version;
|
||||
hash = "sha256-HgbaLKlWU9YL279/WKLMLC/vxwmnDhBZFdELMRyJl0Y=";
|
||||
hash = "sha256-Q06lGGGQxJ7ntgXRzfnsJN+A/08AIOsOkz3cg2xZGr4=";
|
||||
};
|
||||
docs = stdenv.mkDerivation {
|
||||
pname = "ifstate-docs";
|
||||
@@ -80,8 +79,7 @@ let
|
||||
setproctitle
|
||||
]
|
||||
++ lib.optional withConfigValidation jsonschema
|
||||
++ lib.optional withShellColor pygments
|
||||
++ lib.optional withWireguard wgnlpy;
|
||||
++ lib.optional withShellColor pygments;
|
||||
|
||||
pythonRemoveDeps = lib.optional (!withConfigValidation) "jsonschema";
|
||||
|
||||
@@ -100,7 +98,6 @@ let
|
||||
withBpf
|
||||
withConfigValidation
|
||||
withShellColor
|
||||
withWireguard
|
||||
;
|
||||
};
|
||||
# needed for access in schema validaten in module
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
setuptools,
|
||||
cryptography,
|
||||
pyroute2,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wgnlpy";
|
||||
version = "0.1.5";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ArgosyLabs";
|
||||
repo = "wgnlpy";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-5XAfBiKx4SqouA57PxmaCb0ea7mT2VeUI1tgnQE/ZwQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# see https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/83019
|
||||
# Required for ifstate
|
||||
# Upstream Issue/PR: https://github.com/ArgosyLabs/wgnlpy/pull/5
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/1f78a31dc3e8d7ffd4ff4b8c32fabc3ad0265ae2/community/py3-wgnlpy/0001-fix-exception-when-WGPEER_A_LAST_HANDSHAKE_TIME-is-N.patch";
|
||||
hash = "sha256-MO5MMDXnaCPdakMlxCkiCBCDCiTFdG3V66l+AKb95X4=";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
cryptography
|
||||
pyroute2
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"wgnlpy"
|
||||
"wgnlpy.nlas"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Netlink connector to WireGuard";
|
||||
homepage = "https://github.com/ArgosyLabs/wgnlpy";
|
||||
license = with lib.licenses; [ mit ];
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ marcel ];
|
||||
};
|
||||
}
|
||||
@@ -489,6 +489,7 @@ mapAliases {
|
||||
Wand = throw "'Wand' has been renamed to/replaced by 'wand'"; # Converted to throw 2025-10-29
|
||||
WazeRouteCalculator = throw "'WazeRouteCalculator' has been renamed to/replaced by 'wazeroutecalculator'"; # Converted to throw 2025-10-29
|
||||
websocket_client = throw "'websocket_client' has been renamed to/replaced by 'websocket-client'"; # Converted to throw 2025-10-29
|
||||
wgnlpy = throw "'wgnlpy' has been removed, as the upstream repository was unmaintained for several years"; # Converted to throw 2025-11-24
|
||||
worldengine = throw "worldengine has been removed because it has been marked as broken since at least November 2024."; # Added 2025-10-04
|
||||
WSME = throw "'WSME' has been renamed to/replaced by 'wsme'"; # Converted to throw 2025-10-29
|
||||
wxPython_4_2 = throw "'wxPython_4_2' has been renamed to/replaced by 'wxpython'"; # Converted to throw 2025-10-29
|
||||
|
||||
@@ -20384,8 +20384,6 @@ self: super: with self; {
|
||||
|
||||
wget = callPackage ../development/python-modules/wget { };
|
||||
|
||||
wgnlpy = callPackage ../development/python-modules/wgnlpy { };
|
||||
|
||||
wgpu-py = callPackage ../development/python-modules/wgpu-py { };
|
||||
|
||||
whatthepatch = callPackage ../development/python-modules/whatthepatch { };
|
||||
|
||||
Reference in New Issue
Block a user