From de0fb400bf8ed17ce8248da1615e2c2492fb35a1 Mon Sep 17 00:00:00 2001 From: Glenn Searby Date: Fri, 21 Jul 2017 14:22:15 +0100 Subject: [PATCH] linode-api: init at 4.1.1b1 Added Linode's official Python library for their v4 API. This should assist with adding Linode support to Nixops (see: https://github.com/NixOS/nixops/issues/198). Note that this API is still in beta and subject to changes. --- lib/maintainers.nix | 1 + .../python-modules/linode-api/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/linode-api/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index e10136bf070e..e9a4f23c8c12 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -213,6 +213,7 @@ gilligan = "Tobias Pflug "; giogadi = "Luis G. Torres "; gleber = "Gleb Peregud "; + glenns = "Glenn Searby "; globin = "Robin Gloster "; gnidorah = "Alex Ivanov "; goibhniu = "Cillian de RĂ³iste "; diff --git a/pkgs/development/python-modules/linode-api/default.nix b/pkgs/development/python-modules/linode-api/default.nix new file mode 100644 index 000000000000..b6e3de7357ca --- /dev/null +++ b/pkgs/development/python-modules/linode-api/default.nix @@ -0,0 +1,34 @@ +{ stdenv, + buildPythonPackage, + fetchPypi, + isPy3k, + pythonOlder, + lib, + requests, + future, + enum34 }: + +buildPythonPackage rec { + pname = "linode-api"; + version = "4.1.1b1"; + name = "${pname}-${version}"; + + disabled = (pythonOlder "2.7"); + + buildInputs = []; + propagatedBuildInputs = [ requests ] + ++ stdenv.lib.optionals (!isPy3k) [ future ] + ++ stdenv.lib.optionals (pythonOlder "3.4") [ enum34 ]; + + src = fetchPypi { + inherit pname version; + sha256 = "1psf4sknxrjqiz833x4nmh2pw7xi2rvcm7l9lv8jfdwxza63sny5"; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 104dd5354e7d..fb7befd63e5e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12589,6 +12589,8 @@ in { }; }; + linode-api = callPackage ../development/python-modules/linode-api { }; + livereload = buildPythonPackage rec { name = "livereload-${version}"; version = "2.5.0";