Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

python312Packages.carbon: patch cf.readfp

- refactor
- add pythonImportsCheck

+28 -10
+28 -10
pkgs/development/python-modules/carbon/default.nix
··· 1 1 { 2 2 lib, 3 3 buildPythonPackage, 4 + cachetools, 4 5 fetchPypi, 6 + nixosTests, 7 + pytestCheckHook, 8 + pythonOlder, 9 + setuptools, 5 10 twisted, 6 - whisper, 7 11 txamqp, 8 - cachetools, 9 12 urllib3, 10 - nixosTests, 13 + whisper, 11 14 }: 12 15 13 16 buildPythonPackage rec { 14 17 pname = "carbon"; 15 18 version = "1.1.10"; 16 - format = "setuptools"; 19 + pyproject = true; 20 + 21 + disabled = pythonOlder "3.10"; 17 22 18 23 src = fetchPypi { 19 24 inherit pname version; ··· 21 26 }; 22 27 23 28 # Carbon-s default installation is /opt/graphite. This env variable ensures 24 - # carbon is installed as a regular python module. 29 + # carbon is installed as a regular Python module. 25 30 GRAPHITE_NO_PREFIX = "True"; 26 31 27 - propagatedBuildInputs = [ 32 + postPatch = '' 33 + substituteInPlace setup.py \ 34 + --replace-fail "cf.readfp(f, 'setup.cfg')" "cf.read(f, 'setup.cfg')" 35 + ''; 36 + 37 + build-system = [ setuptools ]; 38 + 39 + dependencies = [ 40 + cachetools 28 41 twisted 29 - whisper 30 42 txamqp 31 - cachetools 32 43 urllib3 44 + whisper 33 45 ]; 34 46 47 + # Tests are not shipped with PyPI 48 + doCheck = false; 49 + 35 50 passthru.tests = { 36 51 inherit (nixosTests) graphite; 37 52 }; 38 53 54 + pythonImportsCheck = [ "carbon" ]; 55 + 39 56 meta = with lib; { 40 - homepage = "http://graphiteapp.org/"; 41 57 description = "Backend data caching and persistence daemon for Graphite"; 58 + homepage = "https://github.com/graphite-project/carbon"; 59 + changelog = "https://github.com/graphite-project/carbon/releases/tag/${version}"; 60 + license = licenses.asl20; 42 61 maintainers = with maintainers; [ 43 62 offline 44 63 basvandijk 45 64 ]; 46 - license = licenses.asl20; 47 65 }; 48 66 }