about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aresponses/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aresponses/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/aresponses/default.nix40
1 files changed, 28 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aresponses/default.nix b/nixpkgs/pkgs/development/python-modules/aresponses/default.nix
index 56093192d6c7..53353a137886 100644
--- a/nixpkgs/pkgs/development/python-modules/aresponses/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/aresponses/default.nix
@@ -1,23 +1,25 @@
 { lib
-, buildPythonPackage
-, fetchPypi
-# propagatedBuildInputs
 , aiohttp
-# buildInputs
+, buildPythonPackage
+, fetchFromGitHub
+, isPy3k
 , pytest
 , pytest-asyncio
-, isPy3k
+, pytest-cov
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "aresponses";
-  version = "2.0.0";
+  version = "2.1.2";
 
   disabled = !isPy3k;
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "58693a6b715edfa830a20903ee1d1b2a791251923f311b3bebf113e8ff07bb35";
+  src = fetchFromGitHub {
+    owner = "CircleUp";
+    repo = pname;
+    rev = version;
+    sha256 = "007wrk4wdy97a81imgzxd6sm5dly9v7abmxh9fyfi0vp1p7s75bw";
   };
 
   propagatedBuildInputs = [
@@ -29,13 +31,27 @@ buildPythonPackage rec {
     pytest-asyncio
   ];
 
-  # tests only distributed via git repository, not pypi
-  doCheck = false;
+  checkInputs = [
+    aiohttp
+    pytest-asyncio
+    pytest-cov
+    pytestCheckHook
+  ];
+
+  # Disable tests which requires network access
+  disabledTests = [
+    "test_foo"
+    "test_passthrough"
+  ];
+
+  __darwinAllowLocalNetworking = true;
+
+  pythonImportsCheck = [ "aresponses" ];
 
   meta = with lib; {
     description = "Asyncio testing server";
     homepage = "https://github.com/circleup/aresponses";
     license = licenses.mit;
-    maintainers = [ maintainers.makefu ];
+    maintainers = with maintainers; [ makefu ];
   };
 }