Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4 5# build 6, setuptools 7 8# runtime 9, packaging 10, typing-extensions 11 12# tests 13, pytest-timeout 14, pytestCheckHook 15}: 16 17buildPythonPackage rec { 18 pname = "lightning-utilities"; 19 version = "0.8.0"; 20 format = "pyproject"; 21 22 src = fetchFromGitHub { 23 owner = "Lightning-AI"; 24 repo = "utilities"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-uwmX+/SK2zBkZQbN/t/DZ3i+XbdAJ/RM+Q649QwMUz0="; 27 }; 28 29 nativeBuildInputs = [ 30 setuptools 31 ]; 32 33 propagatedBuildInputs = [ 34 packaging 35 typing-extensions 36 ]; 37 38 pythonImportsCheck = [ 39 "lightning_utilities" 40 ]; 41 42 nativeCheckInputs = [ 43 pytest-timeout 44 pytestCheckHook 45 ]; 46 47 disabledTests = [ 48 "lightning_utilities.core.enums.StrEnum" 49 "lightning_utilities.core.imports.RequirementCache" 50 "lightning_utilities.core.imports.compare_version" 51 "lightning_utilities.core.imports.get_dependency_min_version_spec" 52 # weird doctests fail on imports, but providing the dependency 53 # fails another test 54 "lightning_utilities.core.imports.ModuleAvailableCache" 55 "lightning_utilities.core.imports.requires" 56 ]; 57 58 disabledTestPaths = [ 59 "docs" 60 # doctests that expect docs.txt in the wrong location 61 "src/lightning_utilities/install/requirements.py" 62 ]; 63 64 pytestFlagsArray = [ 65 # warns about distutils removal in python 3.12 66 "-W" "ignore::DeprecationWarning" 67 ]; 68 69 meta = with lib; { 70 changelog = "https://github.com/Lightning-AI/utilities/releases/tag/v${version}"; 71 description = "Common Python utilities and GitHub Actions in Lightning Ecosystem"; 72 homepage = "https://github.com/Lightning-AI/utilities"; 73 license = licenses.asl20; 74 maintainers = with maintainers; [ hexa ]; 75 }; 76}