forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arouteserver: init at 1.23.1 (NixOS#353218)
- Loading branch information
Showing
5 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ python3Packages }: | ||
|
||
with python3Packages; | ||
toPythonApplication aggregate6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
lib, | ||
python3Packages, | ||
fetchFromGitHub, | ||
bgpq4, | ||
}: | ||
|
||
python3Packages.buildPythonPackage rec { | ||
pname = "arouteserver"; | ||
version = "1.23.1"; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "pierky"; | ||
repo = "arouteserver"; | ||
rev = "v${version}"; | ||
hash = "sha256-EZOBMDBsxbuVzzjQWU8V4n3gcLkRQxCq2eVK/Tyko4E="; | ||
}; | ||
|
||
postPatch = '' | ||
substituteInPlace tests/static/test_irr_queries_failover.py --replace-fail 'bgpq4 -h' '${lib.getExe bgpq4} -h' | ||
substituteInPlace pierky/arouteserver/builder.py pierky/arouteserver/config/program.py tests/static/test_cfg_program.py \ | ||
--replace-fail '"bgpq4"' '"${lib.getExe bgpq4}"' | ||
''; | ||
|
||
build-system = with python3Packages; [ setuptools ]; | ||
|
||
dependencies = with python3Packages; [ | ||
aggregate6 | ||
jinja2 | ||
pyyaml | ||
requests | ||
packaging | ||
urllib3 | ||
setuptools | ||
]; | ||
|
||
nativeCheckInputs = with python3Packages; [ | ||
pytestCheckHook | ||
requests-mock | ||
]; | ||
|
||
pythonImportsCheck = [ | ||
"pierky" | ||
"pierky.arouteserver" | ||
]; | ||
|
||
pytestFlagsArray = [ "tests/static" ]; | ||
|
||
meta = { | ||
description = "Automatically build (and test) feature-rich configurations for BGP route servers"; | ||
mainProgram = "arouteserver"; | ||
homepage = "https://github.com/pierky/arouteserver"; | ||
changelog = "https://github.com/pierky/arouteserver/blob/v${version}/CHANGES.rst"; | ||
license = with lib.licenses; [ gpl3Only ]; | ||
maintainers = lib.teams.wdz.members ++ (with lib.maintainers; [ marcel ]); | ||
}; | ||
} |
31 changes: 31 additions & 0 deletions
31
pkgs/development/python-modules/aggregate6/0001-setup-remove-nose-coverage.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From d20c7039316ea7c76da86963b266d3c34001b9f7 Mon Sep 17 00:00:00 2001 | ||
From: Marcel <[email protected]> | ||
Date: Sat, 2 Nov 2024 21:13:37 +0100 | ||
Subject: [PATCH] setup: remove nose, coverage | ||
|
||
--- | ||
setup.py | 3 +-- | ||
1 file changed, 1 insertion(+), 2 deletions(-) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index b880f27..7a47360 100644 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -70,7 +70,7 @@ setup( | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.6' | ||
], | ||
- setup_requires=["nose", "coverage", "mock"], | ||
+ setup_requires=["mock"], | ||
install_requires=["py-radix==0.10.0"] + ( | ||
["future", "ipaddress"] if sys.version_info.major == 2 else [] | ||
), | ||
@@ -78,5 +78,4 @@ setup( | ||
entry_points={'console_scripts': | ||
['aggregate6 = aggregate6.aggregate6:main']}, | ||
data_files = [('man/man7', ['aggregate6.7'])], | ||
- test_suite='nose.collector' | ||
) | ||
-- | ||
2.44.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
lib, | ||
buildPythonPackage, | ||
fetchFromGitHub, | ||
setuptools, | ||
py-radix-sr, | ||
pytestCheckHook, | ||
mock, | ||
}: | ||
|
||
buildPythonPackage rec { | ||
pname = "aggregate6"; | ||
version = "1.0.12"; | ||
pyproject = true; | ||
|
||
src = fetchFromGitHub { | ||
owner = "job"; | ||
repo = "aggregate6"; | ||
rev = version; | ||
hash = "sha256-tBo9LSmEu/0KPSeg17dlh7ngUvP9GyW6b01qqpr5Bx0="; | ||
}; | ||
|
||
patches = [ ./0001-setup-remove-nose-coverage.patch ]; | ||
|
||
# py-radix-sr is a fork, with fixes | ||
postPatch = '' | ||
substituteInPlace setup.py --replace-fail 'py-radix==0.10.0' 'py-radix-sr' | ||
''; | ||
|
||
build-system = [ setuptools ]; | ||
|
||
dependencies = [ py-radix-sr ]; | ||
|
||
nativeCheckInputs = [ | ||
pytestCheckHook | ||
mock | ||
]; | ||
|
||
pythonImportsCheck = [ "aggregate6" ]; | ||
|
||
meta = { | ||
description = "IPv4 and IPv6 prefix aggregation tool"; | ||
mainProgram = "aggregate6"; | ||
homepage = "https://github.com/job/aggregate6"; | ||
license = with lib.licenses; [ bsd2 ]; | ||
maintainers = lib.teams.wdz.members ++ (with lib.maintainers; [ marcel ]); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters