nixpkgs-suyu/pkgs
aszlig b5de8156cb
Merge branch 'vmtools-windows-vm'.
This adds a new function in vmTools, called runInWindowsVM, which allows
to run a derivation within a Windows + Cygwin environment.

To use it, you need to pass a Windows ISO and product key, for example:

------------------------------------------------------
vmTools.runInWindowsVM (stdenv.mkDerivation {
  name = "hello-from-windows";

  windowsImage = {
    isoFile = /path/to/windows/image.iso;
    productKey = "ABCDE-FGHIJ-KLMNO-PQRST-UVWXY";
  };

  buildCommand = ''
    echo 'Look, I am running inside Windoze!'
    uname -a > "$out"
  '';
})
------------------------------------------------------

The derivation is then run within a special build process, which roughly
does something like this:

                ____________
               |            |
               | controller |
               |____________|
              /      |       \
  _________ /    ____|____     \___________      _______
 |         |    |         |    |           |    |       |
 | install | -> | suspend | -> | suspended | -> | build |
 |_________|    |_________|    |___________|    |_______|

There are three steps necessary to produce the builder, which in the end
is just a suspended Windows VM, running Cygwin and OpenSSH.

Those steps are essentially:

 * install: Install the base Windows VM with Cygwin and OpenSSH.
 * suspend: Run the installed VM and dump the memory into a state file.
 * suspended: Resume from the state file and execute the build.

Every build is based on the "suspended" step, which throws away all
changes except to the resulting output store path(s).

All of these steps are based on the controller, which is described in
greater detail in commit 276b72fb93.

The reason I'm merging this right in is because it actually adds a
feature that doesn't break existing functionality and only hooks into
vmTools with a single line.

To the contrary it even duplicates a bit of the code from vmTools, which
might be a good start for refactoring. I didn't do that within that
branch, because it otherwise *could* break existing functionality - VM
tests in particular.

Also, this implementation currently *only* supports Windows XP, because
the implementation was originally made for building a Software where the
majority of the users are using Windows XP and we need to do extensive
testing on that platform.

However, adding support for more recent versions is rather trivial. All
there needs to be done is adding a new unattended installation config in
unattended-image.nix.
2014-02-26 06:24:56 +01:00
..
applications Merge pull request #1448 from pSub/dwm-remove-patch 2014-02-24 22:48:48 +01:00
build-support vmTools: Hook in runInWindowsVM function. 2014-02-26 06:21:48 +01:00
data Merge master into x-updates 2014-02-20 20:55:31 +01:00
desktops xfce4-power-manager: update patch hash (no idea what's changed) 2014-02-22 18:20:44 +01:00
development scotty: jailbreak 2014-02-25 11:14:07 -05:00
games springlobby: add unitsync patch 2014-02-10 14:21:42 +01:00
misc wineUnstable: update from 1.7.11 to 1.7.12 2014-02-14 21:16:22 +02:00
os-specific libselinux: update from 2.2.1 to 2.2.2 2014-02-24 22:04:40 +01:00
servers Add mariadb 2014-02-24 15:34:57 -05:00
shells fish: Fix propagatedBuildInputs and other assorted changes 2014-02-15 12:17:06 +01:00
stdenv Turn the coverage analysis stdenv adapters into setup hooks 2014-02-05 19:18:33 +01:00
test
tools mtools: update from 4.0.17 to 4.0.18 2014-02-24 22:04:40 +01:00
top-level Add libjenkins haskell package 2014-02-25 11:09:26 -05:00