2018-07-21 01:44:44 +01:00
|
|
|
{ lib, pythonPackages, fetchurl, cloud-utils }:
|
2014-10-17 15:09:20 +01:00
|
|
|
|
2017-02-20 16:24:45 +00:00
|
|
|
let version = "0.7.9";
|
2014-10-17 15:09:20 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
in pythonPackages.buildPythonApplication {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "cloud-init";
|
|
|
|
inherit version;
|
2014-10-17 15:09:20 +01:00
|
|
|
namePrefix = "";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launchpad.net/cloud-init/trunk/${version}/+download/cloud-init-${version}.tar.gz";
|
2017-02-20 16:24:45 +00:00
|
|
|
sha256 = "0wnl76pdcj754pl99wxx76hkir1s61x0bg0lh27sdgdxy45vivbn";
|
2014-10-17 15:09:20 +01:00
|
|
|
};
|
|
|
|
|
2017-02-20 16:24:45 +00:00
|
|
|
patches = [ ./add-nixos-support.patch ];
|
2017-04-21 09:55:14 +01:00
|
|
|
prePatch = ''
|
2015-01-08 09:26:49 +00:00
|
|
|
patchShebangs ./tools
|
|
|
|
|
2014-10-17 15:09:20 +01:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace /usr $out \
|
|
|
|
--replace /etc $out/etc \
|
|
|
|
--replace /lib/systemd $out/lib/systemd \
|
2015-11-20 12:48:30 +00:00
|
|
|
--replace 'self.init_system = ""' 'self.init_system = "systemd"'
|
2017-04-21 11:48:02 +01:00
|
|
|
|
|
|
|
substituteInPlace cloudinit/config/cc_growpart.py \
|
|
|
|
--replace 'util.subp(["growpart"' 'util.subp(["${cloud-utils}/bin/growpart"'
|
2017-06-05 20:41:31 +01:00
|
|
|
|
|
|
|
# Argparse is part of python stdlib
|
|
|
|
sed -i s/argparse// requirements.txt
|
2014-10-17 15:09:20 +01:00
|
|
|
'';
|
|
|
|
|
2015-11-20 12:48:30 +00:00
|
|
|
propagatedBuildInputs = with pythonPackages; [ cheetah jinja2 prettytable
|
2017-06-05 20:41:31 +01:00
|
|
|
oauthlib pyserial configobj pyyaml requests jsonpatch ];
|
2014-10-17 15:09:20 +01:00
|
|
|
|
2017-12-11 11:04:06 +00:00
|
|
|
checkInputs = with pythonPackages; [ contextlib2 httpretty mock unittest2 ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2014-10-17 15:09:20 +01:00
|
|
|
meta = {
|
2019-04-22 09:24:21 +01:00
|
|
|
homepage = https://cloudinit.readthedocs.org;
|
2016-06-20 11:53:46 +01:00
|
|
|
description = "Provides configuration and customization of cloud instance";
|
2017-02-20 16:24:45 +00:00
|
|
|
maintainers = [ lib.maintainers.madjar lib.maintainers.phile314 ];
|
2014-10-17 15:09:20 +01:00
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|