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