anchor.diff:  
       # Set the system time from the hardware clock.  Works around an
       # apparent KVM > 1.5.2 bug.
  -    ${pkgs.util-linux}/bin/hwclock -s
  +    ${util-linux}/bin/hwclock -s
   
       export NIX_STORE=${storeDir}
       export NIX_BUILD_TOP=/tmp
  
positive.code: 
  
    extractMTDfs = {file, fs ? null} :
      with pkgs; runInLinuxVM (
      stdenv.mkDerivation {
        name = "extract-file-mtd";
        buildInputs = [ util-linux mtdutils ];
        buildCommand = ''
          ln -s ${kernel}/lib /lib
          ${kmod}/bin/modprobe mtd
  
negative.code:       ++ pkgs.lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "rtc_cmos"
  }:
  
  let
    inherit (pkgs) bash bashInteractive busybox cpio coreutils e2fsprogs fetchurl kmod rpm
      stdenv util-linux
      buildPackages writeScript writeText runCommand;
  in
  rec {
    qemu-common = import ../../../nixos/lib/qemu-common.nix { inherit lib pkgs; };
  
    qemu = buildPackages.qemu_kvm;
  
    modulesClosure = pkgs.makeModulesClosure {
      inherit kernel rootModules;
      firmware = kernel;
    };
  