nixpkgs/pkgs/development/python-modules/htmldate/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

72 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
charset-normalizer,
dateparser,
faust-cchardet,
fetchFromGitHub,
lxml,
pytestCheckHook,
python-dateutil,
setuptools,
urllib3,
}:
buildPythonPackage rec {
pname = "htmldate";
version = "1.9.4";
pyproject = true;
src = fetchFromGitHub {
owner = "adbar";
repo = "htmldate";
tag = "v${version}";
hash = "sha256-ZSHQgj6zXmLdqDQWGnh2l70iXzdohsxdAIQGDSBufIA=";
};
build-system = [ setuptools ];
dependencies = [
charset-normalizer
dateparser
lxml
python-dateutil
urllib3
];
pythonRelaxDeps = [ "lxml" ];
optional-dependencies = {
speed = [
faust-cchardet
urllib3
]
++ urllib3.optional-dependencies.brotli;
all = [
faust-cchardet
urllib3
]
++ urllib3.optional-dependencies.brotli;
};
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# Tests that require an internet connection
"test_input"
"test_cli"
"test_download"
"test_readme_examples"
];
pythonImportsCheck = [ "htmldate" ];
meta = {
description = "Module for the extraction of original and updated publication dates from URLs and web pages";
homepage = "https://htmldate.readthedocs.io";
changelog = "https://github.com/adbar/htmldate/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jokatzke ];
mainProgram = "htmldate";
};
}