4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
38 lines
951 B
Nix
38 lines
951 B
Nix
{ buildPythonPackage, pythonAtLeast, pytest, requests, requests_oauthlib, six
|
|
, fetchFromGitHub, responses, lib, stdenv
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "asana";
|
|
version = "0.10.3";
|
|
|
|
# upstream reportedly doesn't support 3.7 yet, blocked on
|
|
# https://bugs.python.org/issue34226
|
|
disabled = pythonAtLeast "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "asana";
|
|
repo = "python-asana";
|
|
rev = "v${version}";
|
|
sha256 = "11nsfygcfpc2qb2gy4npi9w00cqfh88g7k3rsfq7xambz1zjdz1n";
|
|
};
|
|
|
|
checkInputs = [ pytest responses ];
|
|
propagatedBuildInputs = [ requests requests_oauthlib six ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "requests_oauthlib >= 0.8.0, == 0.8.*" "requests_oauthlib>=0.8.0<2.0"
|
|
'';
|
|
|
|
checkPhase = ''
|
|
py.test tests
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Python client library for Asana";
|
|
homepage = "https://github.com/asana/python-asana";
|
|
license = licenses.mit;
|
|
};
|
|
}
|