nixpkgs/pkgs/development/python-modules/asana/default.nix

36 lines
882 B
Nix
Raw Normal View History

{ lib, buildPythonPackage, pytest, requests, requests_oauthlib, six
, fetchFromGitHub, responses, stdenv
2017-08-31 20:01:15 +01:00
}:
buildPythonPackage rec {
pname = "asana";
2018-02-17 13:18:08 +00:00
version = "0.7.0";
2017-08-31 20:01:15 +01:00
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "asana";
repo = "python-asana";
rev = "v${version}";
sha256 = "0786y3wxqxxhsb0kkpx4bfzif3dhvv3dmm6vnq58iyj94862kpxf";
2017-08-31 20:01:15 +01:00
};
checkInputs = [ pytest responses ];
2017-08-31 20:01:15 +01:00
propagatedBuildInputs = [ requests requests_oauthlib six ];
patchPhase = ''
echo > requirements.txt
sed -i "s/requests~=2.9.1/requests >=2.9.1/" setup.py
sed -i "s/requests_oauthlib~=0.6.1/requests_oauthlib >=0.6.1/" setup.py
'';
checkPhase = ''
py.test tests
'';
meta = with stdenv.lib; {
description = "Python client library for Asana";
homepage = https://github.com/asana/python-asana;
license = licenses.mit;
};
2017-08-31 20:01:15 +01:00
}