1{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, six, clint, pyyaml, docopt 2, requests, jsonpatch, args, schema, responses, backports_csv }: 3 4buildPythonPackage rec { 5 6 pname = "internetarchive"; 7 version = "1.7.2"; 8 9 # Can't use pypi, data files for tests missing 10 src = fetchFromGitHub { 11 owner = "jjjake"; 12 repo = "internetarchive"; 13 rev = "v${version}"; 14 sha256 = "1cijagy22qi8ydrvizqmi1whnc3qr94yk0910lwgpxjywcygggir"; 15 }; 16 # It is hardcoded to specific versions, I don't know why. 17 preConfigure = '' 18 sed "s/schema>=.*/schema>=0.4.0',/" -i setup.py 19 sed "/backports.csv/d" -i setup.py 20 ''; 21 22 #phases = [ "unpackPhase" "configurePhase" "installPhase" "fixupPhase" "installCheckPhase" ]; 23 buildInputs = [ pytest responses ]; 24 propagatedBuildInputs = [ 25 six 26 clint 27 pyyaml 28 docopt 29 requests 30 jsonpatch 31 args 32 schema 33 backports_csv 34 ]; 35 36 # Tests disabled because ia binary doesn't exist when tests run 37 doCheck = false; 38 39 checkPhase = "pytest tests"; 40 41 42 meta = with stdenv.lib; { 43 description = "A python wrapper for the various Internet Archive APIs"; 44 homepage = https://github.com/jjjake/internetarchive; 45 license = licenses.agpl3; 46 }; 47}