Find a file
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
doc Move all db4 packages to the default db5 2014-02-15 12:03:02 +01:00
lib gradm, pax-utils, paxctl: Add myself as a maintainer 2014-02-22 20:17:00 +01:00
maintainers/scripts Fix updating of the tarball mirror 2014-02-19 13:58:42 +01:00
nixos Mediawiki: Add some needed rewrites 2014-02-25 09:13:40 -05:00
pkgs Merge branch 'vmtools-windows-vm'. 2014-02-26 06:24:56 +01:00
.gitignore Merge .gitignore files 2013-10-10 13:28:22 +02:00
.version Next release will be 14.02 Baboon 2013-11-01 09:16:36 +01:00
COPYING * Applying an MIT-style license to Nixpkgs. 2006-04-25 16:50:34 +00:00
default.nix * For convenience, provide a top-level Nix expression that simply 2007-04-26 14:32:57 +00:00
README.md Update README.md 2014-01-24 00:08:00 +01:00

Nixpkgs is a collection of packages for Nix package manager. Nixpkgs also includes NixOS linux distribution source code.