2017-10-01 23:48:20 +02:00
|
|
|
{ stdenv, fetchurl, makeWrapper
|
|
|
|
, gawk, gnused, utillinux, file
|
|
|
|
, wget, python3, qemu, euca2ools
|
|
|
|
, e2fsprogs, cdrkit }:
|
2016-03-30 15:39:53 +02:00
|
|
|
|
2017-10-01 23:48:20 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2016-11-17 15:14:52 +01:00
|
|
|
# NOTICE: if you bump this, make sure to run
|
|
|
|
# $ nix-build nixos/release-combined.nix -A nixos.tests.ec2-nixops
|
2017-10-01 23:48:20 +02:00
|
|
|
# growpart is needed in initrd in nixos/modules/virtualisation/grow-partition.nix
|
|
|
|
name = "cloud-utils-${version}";
|
|
|
|
version = "0.30";
|
2016-03-30 15:39:53 +02:00
|
|
|
src = fetchurl {
|
2017-10-01 23:48:20 +02:00
|
|
|
url = "https://launchpad.net/cloud-utils/trunk/0.3/+download/cloud-utils-${version}.tar.gz";
|
|
|
|
sha256 = "19ca9ckwwsvlqrjz19bc93rq4gv3y4ak7551li2qk95caqyxsq3k";
|
2016-03-30 15:39:53 +02:00
|
|
|
};
|
2017-10-01 23:48:20 +02:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ python3 ];
|
|
|
|
installFlags = [ "LIBDIR=$(out)/lib" "BINDIR=$(out)/bin" "MANDIR=$(out)/man/man1" "DOCDIR=$(out)/doc" ];
|
|
|
|
|
|
|
|
# according to https://packages.ubuntu.com/source/zesty/cloud-utils
|
|
|
|
binDeps = [
|
|
|
|
wget e2fsprogs file gnused gawk utillinux qemu euca2ools cdrkit
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
wrapProgram $i --prefix PATH : "${stdenv.lib.makeBinPath binDeps}:$out/bin"
|
|
|
|
done
|
2016-03-30 15:39:53 +02:00
|
|
|
'';
|
2016-08-02 18:06:29 +02:00
|
|
|
|
2017-10-01 23:48:20 +02:00
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
meta.platforms = stdenv.lib.platforms.unix;
|
2016-03-30 15:39:53 +02:00
|
|
|
}
|