diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/courlan/default.nix | 54 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/courlan/default.nix b/pkgs/development/python-modules/courlan/default.nix new file mode 100644 index 0000000000000..d906f44c0f16f --- /dev/null +++ b/pkgs/development/python-modules/courlan/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, fetchPypi +, langcodes +, pytestCheckHook +, tld +, urllib3 +, pythonOlder +}: + +buildPythonPackage rec { + pname = "courlan"; + version = "0.9.5"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-ONw1suO/H11RbQDVGsEuveVD40F8a+b2oic8D8W1s1M="; + }; + + propagatedBuildInputs = [ + langcodes + tld + urllib3 + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + # disable tests that require an internet connection + disabledTests = [ + "test_urlcheck" + ]; + + # nixify path to the courlan binary in the test suite + postPatch = '' + substituteInPlace tests/unit_tests.py \ + --replace "\"courlan --help\"" "\"$out/bin/courlan --help\"" \ + --replace "courlan_bin = \"courlan\"" "courlan_bin = \"$out/bin/courlan\"" + ''; + + pythonImportsCheck = [ "courlan" ]; + + meta = with lib; { + description = "Clean, filter and sample URLs to optimize data collection"; + homepage = "https://github.com/adbar/courlan"; + changelog = "https://github.com/adbar/courlan/blob/v${version}/HISTORY.md"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ jokatzke ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6d38976064ce6..8b869860ebfd2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2372,6 +2372,8 @@ self: super: with self; { cot = callPackage ../development/python-modules/cot { }; + courlan = callPackage ../development/python-modules/courlan { }; + cov-core = callPackage ../development/python-modules/cov-core { }; coverage = callPackage ../development/python-modules/coverage { }; |