diff options
author | Cole Mickens <cole.mickens@gmail.com> | 2016-02-18 17:30:06 -0800 |
---|---|---|
committer | Cole Mickens <cole.mickens@gmail.com> | 2016-02-18 21:08:28 -0800 |
commit | 718848d5aac47660b0c0d7bdd1702c1f474debf1 (patch) | |
tree | 7d15fb30240c6940d931fc18bedb87ac07f844c2 | |
parent | 412dd80149e837ef89171f1fe0f0423e3b72aa21 (diff) | |
download | nixpkgs-718848d5aac47660b0c0d7bdd1702c1f474debf1.tar nixpkgs-718848d5aac47660b0c0d7bdd1702c1f474debf1.tar.gz nixpkgs-718848d5aac47660b0c0d7bdd1702c1f474debf1.tar.bz2 nixpkgs-718848d5aac47660b0c0d7bdd1702c1f474debf1.tar.lz nixpkgs-718848d5aac47660b0c0d7bdd1702c1f474debf1.tar.xz nixpkgs-718848d5aac47660b0c0d7bdd1702c1f474debf1.tar.zst nixpkgs-718848d5aac47660b0c0d7bdd1702c1f474debf1.zip |
azure: package qemu @ 2.2.0
This commit packages qemu-220. This package is qemu-2.2.0 and is only used with Azure.
-rw-r--r-- | nixos/modules/virtualisation/azure-image.nix | 4 | ||||
-rw-r--r-- | nixos/modules/virtualisation/azure-qemu-220-no-etc-install.patch | 14 | ||||
-rw-r--r-- | pkgs/build-support/vm/default.nix | 9 |
3 files changed, 25 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/azure-image.nix b/nixos/modules/virtualisation/azure-image.nix index 7093e50ed35..f0a739bc95d 100644 --- a/nixos/modules/virtualisation/azure-image.nix +++ b/nixos/modules/virtualisation/azure-image.nix @@ -16,14 +16,14 @@ in cyl=$(((${diskSize}*1024*1024)/(512*63*255))) size=$(($cyl*255*63*512)) roundedsize=$((($size/(1024*1024)+1)*(1024*1024))) - ${pkgs.vmTools.qemu}/bin/qemu-img create -f raw $diskImage $roundedsize + ${pkgs.vmTools.qemu-220}/bin/qemu-img create -f raw $diskImage $roundedsize mv closure xchg/ ''; postVM = '' mkdir -p $out - ${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -O vpc -o subformat=fixed $diskImage $out/disk.vhd + ${pkgs.vmTools.qemu-220}/bin/qemu-img convert -f raw -O vpc -o subformat=fixed $diskImage $out/disk.vhd rm $diskImage ''; diskImageBase = "nixos-image-${config.system.nixosLabel}-${pkgs.stdenv.system}.raw"; diff --git a/nixos/modules/virtualisation/azure-qemu-220-no-etc-install.patch b/nixos/modules/virtualisation/azure-qemu-220-no-etc-install.patch new file mode 100644 index 00000000000..81d29feea3d --- /dev/null +++ b/nixos/modules/virtualisation/azure-qemu-220-no-etc-install.patch @@ -0,0 +1,14 @@ +diff --git a/Makefile b/Makefile +index d6b9dc1..ce7c493 100644 +--- a/Makefile ++++ b/Makefile +@@ -384,8 +384,7 @@ install-confdir: + install-sysconfig: install-datadir install-confdir + $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)" + +-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \ +-install-datadir install-localstatedir ++install: all $(if $(BUILD_DOCS),install-doc) install-datadir + ifneq ($(TOOLS),) + $(call install-prog,$(TOOLS),$(DESTDIR)$(bindir)) + endif diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 96611b725be..23f95bd4979 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -11,6 +11,15 @@ rec { qemu = pkgs.qemu_kvm; + qemu-220 = lib.overrideDerivation pkgs.qemu_kvm (attrs: rec { + version = "2.2.0"; + src = fetchurl { + url = "http://wiki.qemu.org/download/qemu-${version}.tar.bz2"; + sha256 = "1703c3scl5n07gmpilg7g2xzyxnr7jczxgx6nn4m8kv9gin9p35n"; + }; + patches = [ ../../../nixos/modules/virtualisation/azure-qemu-220-no-etc-install.patch ]; + }); + qemuProg = "${qemu}/bin/qemu-kvm"; |