1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 00:54:11 +00:00
nixpkgs/pkgs/tools/virtualization/cloud-init/default.nix

38 lines
1.2 KiB
Nix
Raw Normal View History

2017-04-21 11:48:02 +01:00
{ lib, pythonPackages, fetchurl, kmod, systemd, cloud-utils }:
2017-02-20 16:24:45 +00:00
let version = "0.7.9";
in pythonPackages.buildPythonApplication rec {
name = "cloud-init-${version}";
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";
};
2017-02-20 16:24:45 +00:00
patches = [ ./add-nixos-support.patch ];
prePatch = ''
patchShebangs ./tools
substituteInPlace setup.py \
--replace /usr $out \
--replace /etc $out/etc \
--replace /lib/systemd $out/lib/systemd \
--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"'
'';
propagatedBuildInputs = with pythonPackages; [ cheetah jinja2 prettytable
2017-02-20 16:24:45 +00:00
oauthlib pyserial configobj pyyaml argparse requests jsonpatch ];
meta = {
homepage = http://cloudinit.readthedocs.org;
description = "Provides configuration and customization of cloud instance";
2017-02-20 16:24:45 +00:00
maintainers = [ lib.maintainers.madjar lib.maintainers.phile314 ];
platforms = lib.platforms.all;
};
}