diff options
author | jokatzke <jokatzke@fastmail.com> | 2024-01-05 07:57:49 +0100 |
---|---|---|
committer | jokatzke <jokatzke@fastmail.com> | 2024-02-05 16:33:48 +0100 |
commit | 5731572c47b948cc9d1c1bb89f21c740b5cf0010 (patch) | |
tree | 8fcaf15dbd9dc1eb85bb0de329a890aea03b1564 /pkgs/development/python-modules/courlan/default.nix | |
parent | faaff6e3665ae07fc73abf0c76071f5275044874 (diff) |
python3Packages.courlan: init at 0.9.5
Diffstat (limited to 'pkgs/development/python-modules/courlan/default.nix')
-rw-r--r-- | pkgs/development/python-modules/courlan/default.nix | 54 |
1 files changed, 54 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 ]; + }; +} |