From 9f5f30a7e6efe42b2e6ccddebaf710706dd6a73c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 5 Jul 2013 00:11:47 +0200 Subject: Remove runInGenericVM It's not used anywhere and probably doesn't work anymore. --- pkgs/build-support/vm/default.nix | 50 --------------------------------------- pkgs/build-support/vm/test.nix | 35 --------------------------- 2 files changed, 85 deletions(-) (limited to 'pkgs/build-support') diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 4e02118edff1..097fcf21c1b6 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -345,56 +345,6 @@ rec { }); - qemuCommandGeneric = '' - PATH="${samba}/sbin:$PATH" \ - ${qemuProg} \ - -enable-kvm \ - -nographic -no-reboot \ - -smb $(pwd) -hda $diskImage \ - $QEMU_OPTS - ''; - - - /* Run a command in an x86 virtual machine image containing an - arbitrary OS. The VM should be configured to do the following: - - - Write log output to the serial port. - - - Mount //10.0.2.4/qemu via SMB. - - - Execute the command "cmd" on the SMB share. It can access the - original derivation attributes in "saved-env" on the share. - - - Produce output under "out" on the SMB share. - - - Write an exit code to "in-vm-exit" on the SMB share ("0" - meaning success). - - - Power-off or reboot the machine. - */ - runInGenericVM = drv: lib.overrideDerivation drv (attrs: { - requiredSystemFeatures = [ "kvm" ]; - builder = "${bash}/bin/sh"; - args = ["-e" (vmRunCommand qemuCommandGeneric)]; - QEMU_OPTS = "-m ${toString (if attrs ? memSize then attrs.memSize else 256)}"; - - preVM = '' - diskImage=$(pwd)/disk-image.qcow2 - origImage=${attrs.diskImage} - if test -d "$origImage"; then origImage="$origImage/disk-image.qcow2"; fi - ${kvm}/bin/qemu-img create -b "$origImage" -f qcow2 $diskImage - - echo "$buildCommand" > cmd - - eval "$postPreVM" - ''; - - postVM = '' - cp -prvd out $out - ''; - }); - - /* Like runInLinuxVM, but run the build not using the stdenv from the Nix store, but using the tools provided by /bin, /usr/bin etc. from the specified filesystem image, which typically is a diff --git a/pkgs/build-support/vm/test.nix b/pkgs/build-support/vm/test.nix index 798c283a1774..d0d85fce3662 100644 --- a/pkgs/build-support/vm/test.nix +++ b/pkgs/build-support/vm/test.nix @@ -36,39 +36,4 @@ rec { ''; }); -/* - testFreeBSD = runInGenericVM { - name = "aterm-freebsd"; - src = aterm242fixes.src; - diskImage = "/tmp/freebsd-7.0.qcow"; - - postPreVM = '' - cp $src aterm.tar.bz2 - ''; - - buildCommand = '' - set > /tmp/my-env - . /mnt/saved-env - . /tmp/my-env - unset TEMP - unset TEMPDIR - unset TMP - unset TMPDIR - - set -x - - echo "Hello World!!!" - mkdir /mnt/out - echo "bar" > /mnt/out/foo - - cd /tmp - tar xvf /mnt/aterm.tar.bz2 - cd aterm-* - ./configure --prefix=/mnt/out - make - make install - ''; - }; -*/ - } -- cgit 1.4.1