1{ lib, pythonPackages, fetchurl }:
2
3let version = "0.7.6";
4
5in pythonPackages.buildPythonPackage rec {
6 name = "cloud-init-0.7.6";
7 namePrefix = "";
8
9 src = fetchurl {
10 url = "https://launchpad.net/cloud-init/trunk/${version}/+download/cloud-init-${version}.tar.gz";
11 sha256 = "1mry5zdkfaq952kn1i06wiggc66cqgfp6qgnlpk0mr7nnwpd53wy";
12 };
13
14 preBuild = ''
15 patchShebangs ./tools
16
17 substituteInPlace setup.py \
18 --replace /usr $out \
19 --replace /etc $out/etc \
20 --replace /lib/systemd $out/lib/systemd \
21 '';
22
23 pythonPath = with pythonPackages; [ cheetah jinja2 prettytable
24 oauth pyserial configobj pyyaml argparse requests jsonpatch ];
25
26 setupPyInstallFlags = ["--init-system systemd"];
27
28 meta = {
29 homepage = http://cloudinit.readthedocs.org;
30 description = "provides configuration and customization of cloud instance";
31 maintainers = [ lib.maintainers.madjar ];
32 platforms = lib.platforms.all;
33 };
34}