2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, factory_boy
|
|
|
|
, faker
|
|
|
|
, fetchPypi
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tld";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.12.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "69fed19d26bb3f715366fb4af66fdeace896c55c052b00e8aaba3a7b63f3e7f0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
factory_boy
|
|
|
|
faker
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# these tests require network access, but disabledTestPaths doesn't work.
|
|
|
|
# the file needs to be `import`ed by another python test file, so it
|
|
|
|
# can't simply be removed.
|
|
|
|
preCheck = ''
|
|
|
|
echo > src/tld/tests/test_commands.py
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
pythonImportsCheck = [ "tld" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/barseghyanartur/tld";
|
|
|
|
description = "Extracts the top level domain (TLD) from the URL given";
|
2021-01-15 22:18:51 +00:00
|
|
|
# https://github.com/barseghyanartur/tld/blob/master/README.rst#license
|
|
|
|
# MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-or-later
|
|
|
|
license = with licenses; [ lgpl21Plus mpl11 gpl2Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|