at 24.11-pre 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pytest-asyncio, 7 nix-update-script, 8}: 9 10buildPythonPackage rec { 11 pname = "result"; 12 version = "0.16.1"; 13 format = "setuptools"; 14 15 src = fetchFromGitHub { 16 owner = "rustedpy"; 17 repo = "result"; 18 rev = "v${version}"; 19 hash = "sha256-7BvFIQbl4Udd9GTpbMrAqP0P1BGn/C1CHQ3QUCEMXPs="; 20 }; 21 22 postPatch = '' 23 substituteInPlace pyproject.toml \ 24 --replace '"--flake8",' "" \ 25 --replace '"--tb=short",' "" \ 26 --replace '"--cov=result",' "" \ 27 --replace '"--cov=tests",' "" \ 28 --replace '"--cov-report=term",' "" \ 29 --replace '"--cov-report=xml",' "" 30 ''; 31 32 nativeCheckInputs = [ 33 pytestCheckHook 34 pytest-asyncio 35 ]; 36 37 passthru.updateScript = nix-update-script { }; 38 pythonImportsCheck = [ "result" ]; 39 40 meta = with lib; { 41 description = "A simple Result type for Python 3 inspired by Rust, fully type annotated"; 42 homepage = "https://github.com/rustedpy/result"; 43 license = licenses.mit; 44 maintainers = with lib.maintainers; [ emattiza ]; 45 }; 46}