nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 78 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 docutils, 5 fetchFromGitHub, 6 packaging, 7 pdm-backend, 8 platformdirs, 9 pydantic, 10 pytestCheckHook, 11 pythonOlder, 12 sphinx, 13 sphinx-autodoc-typehints, 14 sphinx-rtd-theme, 15 sphinxHook, 16 tabulate, 17 tomli, 18}: 19 20buildPythonPackage rec { 21 pname = "pytoolconfig"; 22 version = "1.3.1"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "bagel897"; 27 repo = "pytoolconfig"; 28 tag = "v${version}"; 29 hash = "sha256-h21SDgVsnCDZQf5GS7sFE19L/p+OlAFZGEYKc0RHn30="; 30 }; 31 32 outputs = [ 33 "out" 34 "doc" 35 ]; 36 37 PDM_PEP517_SCM_VERSION = version; 38 39 nativeBuildInputs = [ 40 pdm-backend 41 42 # docs 43 docutils 44 sphinx-autodoc-typehints 45 sphinx-rtd-theme 46 sphinxHook 47 ] 48 ++ optional-dependencies.doc; 49 50 propagatedBuildInputs = [ packaging ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 51 52 optional-dependencies = { 53 validation = [ pydantic ]; 54 global = [ platformdirs ]; 55 doc = [ 56 sphinx 57 tabulate 58 ]; 59 }; 60 61 pythonImportsCheck = [ "pytoolconfig" ]; 62 63 nativeCheckInputs = [ 64 pytestCheckHook 65 ] 66 ++ lib.concatAttrValues optional-dependencies; 67 68 meta = { 69 description = "Python tool configuration"; 70 homepage = "https://github.com/bagel897/pytoolconfig"; 71 changelog = "https://github.com/bagel897/pytoolconfig/releases/tag/v${version}"; 72 license = lib.licenses.lgpl3Plus; 73 maintainers = with lib.maintainers; [ 74 fab 75 hexa 76 ]; 77 }; 78}