mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
02dab4ab5c
Long term we should move everything over to `pyproject = true`, but in the mean time we can work towards deprecating the implicit `format` paremeter. cc https://github.com/NixOS/nixpkgs/issues/253154 cc @mweinelt @figsoda
47 lines
1.0 KiB
Nix
47 lines
1.0 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "result";
|
|
version = "0.7.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rustedpy";
|
|
repo = "result";
|
|
rev = "v${version}";
|
|
hash = "sha256-bEf3OJg6ksDvzZE7ezA58Q2FObb5V7BG8vkKtX284Jg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace '"--flake8",' "" \
|
|
--replace '"--tb=short",' "" \
|
|
--replace '"--cov=result",' "" \
|
|
--replace '"--cov=tests",' "" \
|
|
--replace '"--cov-report=term",' "" \
|
|
--replace '"--cov-report=xml",' ""
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
#TODO: figure out the failure "match o:" Invalid Syntax
|
|
"tests/test_pattern_matching.py"
|
|
];
|
|
|
|
pythonImportsCheck = [ "result" ];
|
|
|
|
meta = with lib; {
|
|
description = "A simple Result type for Python 3 inspired by Rust, fully type annotated";
|
|
homepage = "https://github.com/rustedpy/result";
|
|
license = licenses.mit;
|
|
maintainers = [];
|
|
};
|
|
}
|