diff options
author | Jan Malakhovski <oxij@oxij.org> | 2016-09-01 01:51:09 +0000 |
---|---|---|
committer | Jan Malakhovski <oxij@oxij.org> | 2017-03-05 13:59:28 +0000 |
commit | 916fa0a6102a75325dbc3ffca5e88ec435aeffa4 (patch) | |
tree | 4cef631bb67ef9e4eed401768d67b73a962487ae /pkgs/applications/virtualization/xen/packages.nix | |
parent | 1c8940a2b817ed3cb559e7d0fb96e25783b3dbfe (diff) | |
download | nixpkgs-916fa0a6102a75325dbc3ffca5e88ec435aeffa4.tar nixpkgs-916fa0a6102a75325dbc3ffca5e88ec435aeffa4.tar.gz nixpkgs-916fa0a6102a75325dbc3ffca5e88ec435aeffa4.tar.bz2 nixpkgs-916fa0a6102a75325dbc3ffca5e88ec435aeffa4.tar.lz nixpkgs-916fa0a6102a75325dbc3ffca5e88ec435aeffa4.tar.xz nixpkgs-916fa0a6102a75325dbc3ffca5e88ec435aeffa4.tar.zst nixpkgs-916fa0a6102a75325dbc3ffca5e88ec435aeffa4.zip |
xen: rewrite build expression to be more modular, support upstream qemu and seabios
Also: * provides a bunch of build options * documents build options config in longDescription * provides a bunch of predefined packages and documents them some more * sources' hashes stay the same
Diffstat (limited to 'pkgs/applications/virtualization/xen/packages.nix')
-rw-r--r-- | pkgs/applications/virtualization/xen/packages.nix | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/xen/packages.nix b/pkgs/applications/virtualization/xen/packages.nix new file mode 100644 index 00000000000..633ec4f3d12 --- /dev/null +++ b/pkgs/applications/virtualization/xen/packages.nix @@ -0,0 +1,64 @@ +{ callPackage +, stdenv, overrideCC, gcc49 +}: + +# TODO on new Xen version: generalize this to generate [vanilla slim +# light] for each ./<version>.nix. + +rec { + + xen_4_5-vanilla = callPackage ./4.5.nix { + # At the very least included seabios and etherboot need gcc49, + # so we have to build all of it with gcc49. + stdenv = overrideCC stdenv gcc49; + + meta = { + description = "vanilla"; + longDescription = '' + Vanilla version of Xen. Uses forks of Qemu and Seabios bundled + with Xen. This gives vanilla experince, but wastes space and + build time: typical NixOS setup that runs lots of VMs will + build three different versions of Qemu when using this (two + forks and upstream). + ''; + }; + }; + + xen_4_5-slim = xen_4_5-vanilla.override { + withInternalQemu = false; + withInternalTraditionalQemu = true; + withInternalSeabios = false; + withSeabios = true; + + meta = { + description = "slim"; + longDescription = '' + Slimmed-down version of Xen that reuses nixpkgs packages as + much as possible. Different parts may get out of sync, but + this builds faster and uses less space than vanilla. Use with + `qemu_xen` from nixpkgs. + ''; + }; + }; + + xen_4_5-light = xen_4_5-vanilla.override { + withInternalQemu = false; + withInternalTraditionalQemu = false; + withInternalSeabios = false; + withSeabios = true; + + meta = { + description = "light"; + longDescription = '' + Slimmed-down version of Xen without `qemu-traditional` (you + don't need it if you don't know what it is). Use with + `qemu_xen-light` from nixpkgs. + ''; + }; + }; + + xen-vanilla = xen_4_5-vanilla; + xen-slim = xen_4_5-slim; + xen-light = xen_4_5-light; + +} |