Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

pythonPackages.asana: fix build

Fetching sources from GitHub to have needed files like `LICENSE` and
tests available to provide safer builds.

See https://hydra.nixos.org/build/70676254/log
See ticket #36453

(cherry picked from commit 17e1795db014caa2a231a27bae3e97737c3898b8)

authored by Maximilian Bosch and committed by Franz Pletz 5ceb25c2 36eee0b9

+13 -15
+13 -15
pkgs/development/python-modules/asana/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi, 2 - pytest, requests, requests_oauthlib, six 1 + { lib, buildPythonPackage, pytest, requests, requests_oauthlib, six 2 + , fetchFromGitHub, responses, stdenv 3 3 }: 4 4 5 5 buildPythonPackage rec { ··· 7 7 version = "0.7.0"; 8 8 name = "${pname}-${version}"; 9 9 10 - meta = { 11 - description = "Python client library for Asana"; 12 - homepage = https://github.com/asana/python-asana; 13 - license = lib.licenses.mit; 14 - }; 15 - 16 - src = fetchPypi { 17 - inherit pname version; 18 - sha256 = "a7ff4a78529257a5412e78cafd6b3025523364c0ab628d579f2771dd66b254bc"; 10 + src = fetchFromGitHub { 11 + owner = "asana"; 12 + repo = "python-asana"; 13 + rev = "v${version}"; 14 + sha256 = "0786y3wxqxxhsb0kkpx4bfzif3dhvv3dmm6vnq58iyj94862kpxf"; 19 15 }; 20 16 21 - checkInputs = [ pytest ]; 17 + checkInputs = [ pytest responses ]; 22 18 propagatedBuildInputs = [ requests requests_oauthlib six ]; 23 19 24 20 patchPhase = '' ··· 27 23 sed -i "s/requests_oauthlib~=0.6.1/requests_oauthlib >=0.6.1/" setup.py 28 24 ''; 29 25 30 - # ERROR: file not found: tests 31 - doCheck = false; 32 - 33 26 checkPhase = '' 34 27 py.test tests 35 28 ''; 36 29 30 + meta = with stdenv.lib; { 31 + description = "Python client library for Asana"; 32 + homepage = https://github.com/asana/python-asana; 33 + license = licenses.mit; 34 + }; 37 35 }