From 1c545a9593849450b4f3229e94f82dda5881ddc1 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sun, 16 Jan 2022 23:38:04 +0100 Subject: [PATCH 1/3] maintainers: add raitobezarius to the list --- maintainers/maintainer-list.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 40c117f2c185..de99d05f0815 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -9719,6 +9719,13 @@ githubId = 1016742; name = "Rafael GarcĂ­a"; }; + raitobezarius = { + email = "ryan@lahfa.xyz"; + matrix = "@raitobezarius:matrix.org"; + github = "RaitoBezarius"; + githubId = 314564; + name = "Ryan Lahfa"; + }; raquelgb = { email = "raquel.garcia.bautista@gmail.com"; github = "raquelgb"; From 6f1e8c316001b997d553aca000fcb80737ae9406 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Sun, 16 Jan 2022 23:38:16 +0100 Subject: [PATCH 2/3] python3Packages.ripe-atlas-sagan: init at 1.3.1 --- .../ripe-atlas-sagan/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/ripe-atlas-sagan/default.nix diff --git a/pkgs/development/python-modules/ripe-atlas-sagan/default.nix b/pkgs/development/python-modules/ripe-atlas-sagan/default.nix new file mode 100644 index 000000000000..ae536ba96894 --- /dev/null +++ b/pkgs/development/python-modules/ripe-atlas-sagan/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, python-dateutil +, pytz +, cryptography +, pytest +, pytestCheckHook +, fetchFromGitHub +}: + +buildPythonPackage rec { + pname = "ripe-atlas-sagan"; + version = "1.3.1"; + + src = fetchFromGitHub { + owner = "RIPE-NCC"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-xIBIKsQvDmVBa/C8/7Wr3WKeepHaGhoXlgatXSUtWLA="; + }; + + propagatedBuildInputs = [ + python-dateutil + pytz + cryptography + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pytestFlagsArray = [ "tests/*.py" ]; + + disabledTests = [ + "test_invalid_country_code" # This test fail for unknown reason, I suspect it to be flaky. + ]; + + pythonImportsCheck = [ + "ripe.atlas.sagan" + ]; + + meta = with lib; { + description = "A parsing library for RIPE Atlas measurements results"; + homepage = "https://github.com/RIPE-NCC/ripe-atlas-sagan"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ raitobezarius ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3e8075885a75..1ff4f2de6325 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8476,6 +8476,8 @@ in { ring-doorbell = callPackage ../development/python-modules/ring-doorbell { }; + ripe-atlas-sagan = callPackage ../development/python-modules/ripe-atlas-sagan { }; + riprova = callPackage ../development/python-modules/riprova { }; ripser = callPackage ../development/python-modules/ripser { }; From 19c8149641c98c513ed5aec68f9fbd24621df278 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Aug 2022 10:02:59 +0200 Subject: [PATCH 3/3] python3Packages.ripe-atlas-sagan: add optional dependency --- .../ripe-atlas-sagan/default.nix | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/ripe-atlas-sagan/default.nix b/pkgs/development/python-modules/ripe-atlas-sagan/default.nix index ae536ba96894..3b3b16ce78e5 100644 --- a/pkgs/development/python-modules/ripe-atlas-sagan/default.nix +++ b/pkgs/development/python-modules/ripe-atlas-sagan/default.nix @@ -1,38 +1,51 @@ { lib , buildPythonPackage -, python-dateutil -, pytz , cryptography -, pytest -, pytestCheckHook , fetchFromGitHub +, pytestCheckHook +, python-dateutil +, pythonOlder +, pytz +, ujson }: buildPythonPackage rec { pname = "ripe-atlas-sagan"; version = "1.3.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "RIPE-NCC"; repo = pname; rev = "v${version}"; - sha256 = "sha256-xIBIKsQvDmVBa/C8/7Wr3WKeepHaGhoXlgatXSUtWLA="; + hash = "sha256-xIBIKsQvDmVBa/C8/7Wr3WKeepHaGhoXlgatXSUtWLA="; }; propagatedBuildInputs = [ + cryptography python-dateutil pytz - cryptography ]; + passthru.optional-dependencies = { + fast = [ + ujson + ]; + }; + checkInputs = [ pytestCheckHook ]; - pytestFlagsArray = [ "tests/*.py" ]; + pytestFlagsArray = [ + "tests/*.py" + ]; disabledTests = [ - "test_invalid_country_code" # This test fail for unknown reason, I suspect it to be flaky. + # This test fail for unknown reason, I suspect it to be flaky. + "test_invalid_country_code" ]; pythonImportsCheck = [