nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 cherrypy,
5 fetchFromGitHub,
6 filelock,
7 msgpack,
8 pytestCheckHook,
9 redis,
10 requests,
11 uv-build,
12}:
13
14buildPythonPackage rec {
15 pname = "cachecontrol";
16 version = "0.14.4";
17 pyproject = true;
18
19 __darwinAllowLocalNetworking = true;
20
21 src = fetchFromGitHub {
22 owner = "ionrock";
23 repo = "cachecontrol";
24 tag = "v${version}";
25 hash = "sha256-627SqJocVOO0AfI8vswPqOr15MA/Lx7RLAdRAXzWu84=";
26 };
27
28 build-system = [ uv-build ];
29
30 dependencies = [
31 msgpack
32 requests
33 ];
34
35 optional-dependencies = {
36 filecache = [ filelock ];
37 redis = [ redis ];
38 };
39
40 nativeCheckInputs = [
41 cherrypy
42 pytestCheckHook
43 ]
44 ++ lib.concatAttrValues optional-dependencies;
45
46 pythonImportsCheck = [ "cachecontrol" ];
47
48 meta = {
49 description = "Httplib2 caching for requests";
50 mainProgram = "doesitcache";
51 homepage = "https://github.com/ionrock/cachecontrol";
52 changelog = "https://github.com/psf/cachecontrol/releases/tag/${src.tag}";
53 license = lib.licenses.asl20;
54 maintainers = with lib.maintainers; [ dotlambda ];
55 };
56}