lol

python3Packages.ripe-atlas-sagan: add optional dependency

authored by

Fabian Affolter and committed by
GitHub
19c81496 6f1e8c31

+21 -8
+21 -8
pkgs/development/python-modules/ripe-atlas-sagan/default.nix
··· 1 1 { lib 2 2 , buildPythonPackage 3 - , python-dateutil 4 - , pytz 5 3 , cryptography 6 - , pytest 4 + , fetchFromGitHub 7 5 , pytestCheckHook 8 - , fetchFromGitHub 6 + , python-dateutil 7 + , pythonOlder 8 + , pytz 9 + , ujson 9 10 }: 10 11 11 12 buildPythonPackage rec { 12 13 pname = "ripe-atlas-sagan"; 13 14 version = "1.3.1"; 15 + format = "setuptools"; 16 + 17 + disabled = pythonOlder "3.7"; 14 18 15 19 src = fetchFromGitHub { 16 20 owner = "RIPE-NCC"; 17 21 repo = pname; 18 22 rev = "v${version}"; 19 - sha256 = "sha256-xIBIKsQvDmVBa/C8/7Wr3WKeepHaGhoXlgatXSUtWLA="; 23 + hash = "sha256-xIBIKsQvDmVBa/C8/7Wr3WKeepHaGhoXlgatXSUtWLA="; 20 24 }; 21 25 22 26 propagatedBuildInputs = [ 27 + cryptography 23 28 python-dateutil 24 29 pytz 25 - cryptography 26 30 ]; 31 + 32 + passthru.optional-dependencies = { 33 + fast = [ 34 + ujson 35 + ]; 36 + }; 27 37 28 38 checkInputs = [ 29 39 pytestCheckHook 30 40 ]; 31 41 32 - pytestFlagsArray = [ "tests/*.py" ]; 42 + pytestFlagsArray = [ 43 + "tests/*.py" 44 + ]; 33 45 34 46 disabledTests = [ 35 - "test_invalid_country_code" # This test fail for unknown reason, I suspect it to be flaky. 47 + # This test fail for unknown reason, I suspect it to be flaky. 48 + "test_invalid_country_code" 36 49 ]; 37 50 38 51 pythonImportsCheck = [