Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, 2 buildPythonPackage, 3 fetchPypi, 4 isPy3k, 5 pythonOlder, 6 lib, 7 requests, 8 future, 9 enum34 }: 10 11buildPythonPackage rec { 12 pname = "linode-api"; 13 version = "4.1.2b0"; # NOTE: this is a beta, and the API may change in future versions. 14 name = "${pname}-${version}"; 15 16 disabled = (pythonOlder "2.7"); 17 18 propagatedBuildInputs = [ requests future ] 19 ++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ]; 20 21 postPatch = (stdenv.lib.optionalString (!pythonOlder "3.4") '' 22 sed -i -e '/"enum34",/d' setup.py 23 ''); 24 25 doCheck = false; # This library does not have any tests at this point. 26 27 src = fetchPypi { 28 inherit pname version; 29 sha256 = "19yzyb4sbxib8yxmrqm6d8i0fm8cims56q7kiq2ana26nbcm0gr4"; 30 }; 31 32 meta = { 33 homepage = "https://github.com/linode/python-linode-api"; 34 description = "The official python library for the Linode API v4 in python."; 35 license = lib.licenses.bsd3; 36 maintainers = with lib.maintainers; [ glenns ]; 37 }; 38}