summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/outcome/default.nix27
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/outcome/default.nix b/pkgs/development/python-modules/outcome/default.nix
new file mode 100644
index 000000000000..e91925c75d50
--- /dev/null
+++ b/pkgs/development/python-modules/outcome/default.nix
@@ -0,0 +1,27 @@
+{ lib, buildPythonPackage, fetchPypi, pythonOlder
+, attrs
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "outcome";
+  version = "0.1.0a0";
+  disabled = pythonOlder "3.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0cqwakzigw0602dxlb7c1882jwr8hn5nrxk1l8iwlmzc9whh48wn";
+  };
+
+  checkInputs = [ pytest ];
+  propagatedBuildInputs = [ attrs ];
+  # Has a test dependency on trio, which depends on outcome.
+  doCheck = false;
+
+  meta = {
+    description = "Capture the outcome of Python function calls.";
+    homepage = https://github.com/python-trio/outcome;
+    license = with lib.licenses; [ mit asl20 ];
+    maintainers = with lib.maintainers; [ catern ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2e8f77d8a90e..05d956de7887 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -303,6 +303,8 @@ in {
 
   oauthenticator = callPackage ../development/python-modules/oauthenticator { };
 
+  outcome = callPackage ../development/python-modules/outcome {};
+
   plantuml = callPackage ../tools/misc/plantuml { };
 
   Pmw = callPackage ../development/python-modules/Pmw { };