blob: 01ac7b15e79df6a7c26a3f585b462f39a4ef777a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
{
lib,
fetchFromGitHub,
buildPythonPackage,
setuptools,
pythonOlder,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "fake-useragent";
version = "2.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "fake-useragent";
repo = "fake-useragent";
tag = version;
hash = "sha256-CaFIXcS5y6m9mAfy4fniuA4VPTl6JfFq1WHnlLFz6fA=";
};
postPatch = ''
sed -i '/addopts/d' pytest.ini
'';
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "fake_useragent" ];
disabledTests = lib.optionals (pythonOlder "3.12") [
"test_utils_load_pkg_resource_fallback"
];
meta = {
changelog = "https://github.com/fake-useragent/fake-useragent/releases/tag/${src.tag}";
description = "Up to date simple useragent faker with real world database";
homepage = "https://github.com/hellysmile/fake-useragent";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ evanjs ];
};
}
|