1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 hatchling, 7 pytest-codspeed, 8 pytest-snapshot, 9 pytestCheckHook, 10}: 11 12buildPythonPackage rec { 13 pname = "awesomeversion"; 14 version = "25.8.0"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.8"; 18 19 src = fetchFromGitHub { 20 owner = "ludeeus"; 21 repo = "awesomeversion"; 22 tag = version; 23 hash = "sha256-2CEuJagUkYwtjzpQLYLlz+V5e2feEU6di3wI0+uWuy4="; 24 }; 25 26 postPatch = '' 27 # Upstream doesn't set a version 28 substituteInPlace pyproject.toml \ 29 --replace-fail 'version = "0"' 'version = "${version}"' 30 ''; 31 32 nativeBuildInputs = [ hatchling ]; 33 34 pythonImportsCheck = [ "awesomeversion" ]; 35 36 nativeCheckInputs = [ 37 pytest-codspeed 38 pytest-snapshot 39 pytestCheckHook 40 ]; 41 42 meta = with lib; { 43 description = "Python module to deal with versions"; 44 homepage = "https://github.com/ludeeus/awesomeversion"; 45 changelog = "https://github.com/ludeeus/awesomeversion/releases/tag/${src.tag}"; 46 license = with licenses; [ mit ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}