git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.result: init at 0.7.0
commitf23cb42acfeb707ad416167490399bdc0cddd24f authorDzmitry Malyshau <kvark@fastmail.com> dateThu 7 Apr 2022, 15:03 (5 years ago) parent625c488
2 files changed+47
pkgs/development/python-modules/result/default.nix+45 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/result/default.nixnew file+45
@@ -0,0 +1,45 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestCheckHook
5+}:
6+
7+buildPythonPackage rec {
8+ pname = "result";
9+ version = "0.7.0";
10+
11+ src = fetchFromGitHub {
12+ owner = "rustedpy";
13+ repo = "result";
14+ rev = "v${version}";
15+ sha256 = "sha256-bEf3OJg6ksDvzZE7ezA58Q2FObb5V7BG8vkKtX284Jg=";
16+ };
17+
18+ postPatch = ''
19+ substituteInPlace pyproject.toml \
20+ --replace '"--flake8",' "" \
21+ --replace '"--tb=short",' "" \
22+ --replace '"--cov=result",' "" \
23+ --replace '"--cov=tests",' "" \
24+ --replace '"--cov-report=term",' "" \
25+ --replace '"--cov-report=xml",' ""
26+ '';
27+
28+ checkInputs = [
29+ pytestCheckHook
30+ ];
31+
32+ disabledTestPaths = [
33+ #TODO: figure out the failure "match o:" Invalid Syntax
34+ "tests/test_pattern_matching.py"
35+ ];
36+
37+ pythonImportsCheck = [ "result" ];
38+
39+ meta = with lib; {
40+ description = "A simple Result type for Python 3 inspired by Rust, fully type annotated";
41+ homepage = "https://github.com/rustedpy/result";
42+ license = licenses.mit;
43+ maintainers = [ maintainers.kvark ];
44+ };
45+}
pkgs/top-level/python-packages.nix+2
@@ -8823,6 +8823,8 @@ in {
88238823
88248824 restview = callPackage ../development/python-modules/restview { };
88258825
8826+ result = callPackage ../development/python-modules/result { };
8827+
88268828 rethinkdb = callPackage ../development/python-modules/rethinkdb { };
88278829
88288830 retry = callPackage ../development/python-modules/retry { };