about summary refs log tree commit diff
path: root/pkgs/applications/virtualization/xen/packages.nix
blob: 791a3b91818a99a911d8496783a2d35e69f76107 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{ callPackage
, stdenv, overrideCC, gcc49
}:

# TODO(@oxij) 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_4_8-vanilla = callPackage ./4.8.nix {
    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_8-slim = xen_4_8-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_8-light = xen_4_8-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_4_10-vanilla = callPackage ./4.10.nix {
    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_10-slim = xen_4_10-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_10-light = xen_4_10-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_8-vanilla;
  xen-slim = xen_4_8-slim;
  xen-light = xen_4_8-light;

}