diff --git a/pkgs/tools/virtualization/cloud-init/default.nix b/pkgs/tools/virtualization/cloud-init/default.nix new file mode 100644 index 000000000000..48eb68242e1e --- /dev/null +++ b/pkgs/tools/virtualization/cloud-init/default.nix @@ -0,0 +1,34 @@ +{ lib, pythonPackages, fetchurl }: + +let version = "0.7.6"; + +in pythonPackages.buildPythonPackage rec { + name = "cloud-init-0.7.6"; + namePrefix = ""; + + src = fetchurl { + url = "https://launchpad.net/cloud-init/trunk/${version}/+download/cloud-init-${version}.tar.gz"; + sha256 = "1mry5zdkfaq952kn1i06wiggc66cqgfp6qgnlpk0mr7nnwpd53wy"; + }; + + preBuild = '' + patchShebangs ./tools + + substituteInPlace setup.py \ + --replace /usr $out \ + --replace /etc $out/etc \ + --replace /lib/systemd $out/lib/systemd \ + ''; + + pythonPath = with pythonPackages; [ cheetah jinja2 prettytable + oauth pyserial configobj pyyaml argparse requests jsonpatch ]; + + setupPyInstallFlags = ["--init-system systemd"]; + + meta = { + homepage = http://cloudinit.readthedocs.org; + description = "provides configuration and customization of cloud instance"; + maintainers = [ lib.maintainers.madjar ]; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3b27e447009d..7806969c83c8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -657,6 +657,8 @@ let ccnet = callPackage ../tools/networking/ccnet { }; + cloud-init = callPackage ../tools/virtualization/cloud-init { }; + consul = callPackage ../servers/consul { inherit ruby rubyLibs; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fcb7eb212a09..7b7a996a0d2e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2654,6 +2654,42 @@ let }; }; + jsonpatch = buildPythonPackage rec { + name = "jsonpatch-1.8"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/j/jsonpatch/jsonpatch-1.8.tar.gz"; + sha256 = "0xhp6prvk219vnzixbj231wymd458nqbnmsf5fn4252092prvig5"; + }; + + propagatedBuildInputs = with self; [ six jsonpointer ]; + + meta = { + description = "Apply JSON-Patches (RFC 6902)"; + homepage = "https://github.com/stefankoegl/python-json-patch"; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.all; + }; + }; + + jsonpointer = buildPythonPackage rec { + name = "jsonpointer-1.4"; + + src = pkgs.fetchurl { + url = "https://pypi.python.org/packages/source/j/jsonpointer/jsonpointer-1.4.tar.gz"; + sha256 = "1d0555smqwdbi0nm48hyqzywb9m2jlz5izgv56ll3zk7viz3b7fb"; + }; + + #propagatedBuildInputs = with self; [ six jsonpointer ]; + + meta = { + description = "Identify specific nodes in a JSON document (RFC 6901)"; + homepage = "https://github.com/stefankoegl/python-json-pointer"; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.all; + }; + }; + jsonwatch = buildPythonPackage rec { name = "jsonwatch-0.2.0"; @@ -5993,6 +6029,22 @@ let }; }; + oauth = buildPythonPackage (rec { + name = "oauth-1.0.1"; + + src = pkgs.fetchurl { + url = "http://pypi.python.org/packages/source/o/oauth/oauth-1.0.1.tar.gz"; + sha256 = "0pdgi35hczsslil4890xqawnbpdazkgf2v1443847h5hy2gq2sg7"; + }; + + meta = { + homepage = "http://code.google.com/p/oauth"; + description = "Library for OAuth version 1.0a."; + license = licenses.mit; + platforms = stdenv.lib.platforms.all; + }; + }); + oauth2 = buildPythonPackage (rec { name = "oauth2-1.5.211"; disabled = isPy3k;