2017-02-20 17:24:45 +01:00
|
|
|
{ lib, pythonPackages, fetchurl, kmod, systemd }:
|
2014-10-17 16:09:20 +02:00
|
|
|
|
2017-02-20 17:24:45 +01:00
|
|
|
let version = "0.7.9";
|
2014-10-17 16:09:20 +02:00
|
|
|
|
2016-02-19 13:12:11 +01:00
|
|
|
in pythonPackages.buildPythonApplication rec {
|
2015-11-18 17:56:26 +01:00
|
|
|
name = "cloud-init-${version}";
|
2014-10-17 16:09:20 +02:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launchpad.net/cloud-init/trunk/${version}/+download/cloud-init-${version}.tar.gz";
|
2017-02-20 17:24:45 +01:00
|
|
|
sha256 = "0wnl76pdcj754pl99wxx76hkir1s61x0bg0lh27sdgdxy45vivbn";
|
2014-10-17 16:09:20 +02:00
|
|
|
};
|
|
|
|
|
2017-02-20 17:24:45 +01:00
|
|
|
patches = [ ./add-nixos-support.patch ];
|
2017-04-21 10:55:14 +02:00
|
|
|
prePatch = ''
|
2015-01-08 10:26:49 +01:00
|
|
|
patchShebangs ./tools
|
|
|
|
|
2014-10-17 16:09:20 +02:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace /usr $out \
|
|
|
|
--replace /etc $out/etc \
|
|
|
|
--replace /lib/systemd $out/lib/systemd \
|
2015-11-20 13:48:30 +01:00
|
|
|
--replace 'self.init_system = ""' 'self.init_system = "systemd"'
|
2014-10-17 16:09:20 +02:00
|
|
|
'';
|
|
|
|
|
2015-11-20 13:48:30 +01:00
|
|
|
propagatedBuildInputs = with pythonPackages; [ cheetah jinja2 prettytable
|
2017-02-20 17:24:45 +01:00
|
|
|
oauthlib pyserial configobj pyyaml argparse requests jsonpatch ];
|
2014-10-17 16:09:20 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://cloudinit.readthedocs.org;
|
2016-06-20 12:53:46 +02:00
|
|
|
description = "Provides configuration and customization of cloud instance";
|
2017-02-20 17:24:45 +01:00
|
|
|
maintainers = [ lib.maintainers.madjar lib.maintainers.phile314 ];
|
2014-10-17 16:09:20 +02:00
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|