about summary refs log tree commit diff
path: root/pkgs/development/python-modules/trio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/trio/default.nix')
-rw-r--r--pkgs/development/python-modules/trio/default.nix94
1 files changed, 43 insertions, 51 deletions
diff --git a/pkgs/development/python-modules/trio/default.nix b/pkgs/development/python-modules/trio/default.nix
index cc276fef5c525..5fc2e6cd2e306 100644
--- a/pkgs/development/python-modules/trio/default.nix
+++ b/pkgs/development/python-modules/trio/default.nix
@@ -1,70 +1,62 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, pythonOlder
-, stdenv
-
-# build-system
-, setuptools
-
-# dependencies
-, attrs
-, exceptiongroup
-, idna
-, outcome
-, sniffio
-, sortedcontainers
-
-# tests
-, astor
-, coreutils
-, jedi
-, pyopenssl
-, pytestCheckHook
-, pytest-trio
-, trustme
-, yapf
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  pythonOlder,
+  stdenv,
+
+  # build-system
+  setuptools,
+
+  # dependencies
+  attrs,
+  exceptiongroup,
+  idna,
+  outcome,
+  sniffio,
+  sortedcontainers,
+
+  # tests
+  astor,
+  coreutils,
+  jedi,
+  pyopenssl,
+  pytestCheckHook,
+  pytest-trio,
+  trustme,
+  yapf,
 }:
 
 let
   # escape infinite recursion with pytest-trio
-  pytest-trio' = (pytest-trio.override {
-    trio = null;
-  }).overrideAttrs {
+  pytest-trio' = (pytest-trio.override { trio = null; }).overrideAttrs {
     doCheck = false;
-    pythonImportsCheck = [];
+    pythonImportsCheck = [ ];
   };
 in
 buildPythonPackage rec {
   pname = "trio";
-  version = "0.24.0";
+  version = "0.25.0";
   pyproject = true;
 
   disabled = pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-/6CadKa/gbhPhhOQn7C+ruhHV0UBg6ei4LR7RVwMrF0=";
+  src = fetchFromGitHub {
+    owner = "python-trio";
+    repo = "trio";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-JQ493U4WINOG6ob4IzfNQt5Lgs3DmEM2BDwbae7Bvsw=";
   };
 
-  postPatch = ''
-    substituteInPlace src/trio/_tests/test_subprocess.py \
-      --replace "/bin/sleep" "${coreutils}/bin/sleep"
-  '';
+  build-system = [ setuptools ];
 
-  nativeBuildInputs = [
-    setuptools
-  ];
-
-  propagatedBuildInputs = [
+  dependencies = [
     attrs
     idna
     outcome
     sniffio
     sortedcontainers
-  ] ++ lib.optionals (pythonOlder "3.11") [
-    exceptiongroup
-  ];
+  ] ++ lib.optionals (pythonOlder "3.11") [ exceptiongroup ];
 
   # tests are failing on Darwin
   doCheck = !stdenv.isDarwin;
@@ -103,14 +95,14 @@ buildPythonPackage rec {
     "src/trio/_tests/tools/test_gen_exports.py"
   ];
 
-  pytestFlagsArray = [
-    "-W" "ignore::DeprecationWarning"
-  ];
-
   meta = {
+    changelog = "https://github.com/python-trio/trio/blob/v${version}/docs/source/history.rst";
     description = "An async/await-native I/O library for humans and snake people";
     homepage = "https://github.com/python-trio/trio";
-    license = with lib.licenses; [ mit asl20 ];
+    license = with lib.licenses; [
+      mit
+      asl20
+    ];
     maintainers = with lib.maintainers; [ catern ];
   };
 }