2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
six,
|
|
|
|
tldextract,
|
2021-04-17 00:35:05 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "surt";
|
|
|
|
version = "0.3.1";
|
2023-10-19 13:55:26 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "internetarchive";
|
|
|
|
repo = "surt";
|
2023-10-19 13:55:26 +00:00
|
|
|
# Has no git tag, https://github.com/internetarchive/surt/issues/26
|
|
|
|
rev = "6934c321b3e2f66af9c001d882475949f00570c5";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-pSMNpFfq2V0ANWNFPcb1DwPHccbfddo9P4xZ+ghwbz4=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
tldextract
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "surt" ];
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests want to download Public Suffix List
|
|
|
|
"test_getPublicPrefix"
|
|
|
|
"test_getPublicSuffix"
|
|
|
|
];
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Sort-friendly URI Reordering Transform (SURT) python module";
|
|
|
|
homepage = "https://github.com/internetarchive/surt";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|