summary refs log tree commit diff
path: root/pkgs/development/python-modules/asana/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/asana/default.nix')
-rw-r--r--pkgs/development/python-modules/asana/default.nix28
1 files changed, 13 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/asana/default.nix b/pkgs/development/python-modules/asana/default.nix
index 91664f76ad1..62b176fb59c 100644
--- a/pkgs/development/python-modules/asana/default.nix
+++ b/pkgs/development/python-modules/asana/default.nix
@@ -1,5 +1,5 @@
-{ lib, buildPythonPackage, fetchPypi,
-  pytest, requests, requests_oauthlib, six
+{ lib, buildPythonPackage, pytest, requests, requests_oauthlib, six
+, fetchFromGitHub, responses, stdenv
 }:
 
 buildPythonPackage rec {
@@ -7,18 +7,14 @@ buildPythonPackage rec {
   version = "0.7.0";
   name = "${pname}-${version}";
 
-  meta = {
-    description = "Python client library for Asana";
-    homepage = https://github.com/asana/python-asana;
-    license = lib.licenses.mit;
-  };
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "a7ff4a78529257a5412e78cafd6b3025523364c0ab628d579f2771dd66b254bc";
+  src = fetchFromGitHub {
+    owner = "asana";
+    repo = "python-asana";
+    rev = "v${version}";
+    sha256 = "0786y3wxqxxhsb0kkpx4bfzif3dhvv3dmm6vnq58iyj94862kpxf";
   };
 
-  checkInputs = [ pytest ];
+  checkInputs = [ pytest responses ];
   propagatedBuildInputs = [ requests requests_oauthlib six ];
 
   patchPhase = ''
@@ -27,11 +23,13 @@ buildPythonPackage rec {
     sed -i "s/requests_oauthlib~=0.6.1/requests_oauthlib >=0.6.1/" setup.py
   '';
 
-  # ERROR: file not found: tests
-  doCheck = false; 
-
   checkPhase = ''
     py.test tests
   '';
 
+  meta = with stdenv.lib; {
+    description = "Python client library for Asana";
+    homepage = https://github.com/asana/python-asana;
+    license = licenses.mit;
+  };
 }