nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytestCheckHook,
7 pytest-cov-stub,
8 pytest-asyncio,
9 stdenv,
10}:
11
12buildPythonPackage rec {
13 pname = "onecache";
14 version = "0.8.0";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "sonic182";
19 repo = "onecache";
20 tag = version;
21 hash = "sha256-W+5AF5W7Unz5EnAum4WOrKRKet1efzwmEryB2WWlRKY=";
22 };
23
24 build-system = [ poetry-core ];
25
26 nativeCheckInputs = [
27 pytestCheckHook
28 pytest-cov-stub
29 pytest-asyncio
30 ];
31
32 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
33 # test fails due to unknown reason on darwin
34 "test_lru_and_ttl_refresh"
35 ];
36
37 pythonImportsCheck = [ "onecache" ];
38
39 meta = {
40 changelog = "https://github.com/sonic182/onecache/blob/${version}/CHANGELOG.md";
41 description = "Python LRU and TTL cache for sync and async code";
42 license = lib.licenses.mit;
43 homepage = "https://github.com/sonic182/onecache";
44 maintainers = with lib.maintainers; [ geraldog ];
45 };
46}