nixpkgs/pkgs/development/python-modules/linode-api/default.nix
Glenn Searby 2cf5f3cc60
linode-api: 4.1.2b0 -> 4.1.6b0
Needed because the underlying HTTP endpoint has also changed.
2018-03-30 12:39:39 +08:00

39 lines
1,005 B
Nix

{ stdenv,
buildPythonPackage,
fetchPypi,
isPy3k,
pythonOlder,
lib,
requests,
future,
enum34 }:
buildPythonPackage rec {
pname = "linode-api";
version = "4.1.6b0"; # NOTE: this is a beta, and the API may change in future versions.
name = "${pname}-${version}";
disabled = (pythonOlder "2.7");
propagatedBuildInputs = [ requests future ]
++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ];
postPatch = (stdenv.lib.optionalString (!pythonOlder "3.4") ''
sed -i -e '/"enum34",/d' setup.py
'');
doCheck = false; # This library does not have any tests at this point.
src = fetchPypi {
inherit pname version;
sha256 = "0k80shsp10zvl5h4w83b8irv90mwmwygl59h97zi2q784xr4dxs5";
};
meta = {
homepage = "https://github.com/linode/python-linode-api";
description = "The official python library for the Linode API v4 in python.";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ glenns ];
};
}