summaryrefslogtreecommitdiffstats
path: root/nixos/release-small.nix
blob: 8db36109abf78208a07f5769f75bf4e4c579c46b (plain)
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# This jobset is used to generate a NixOS channel that contains a
# small subset of Nixpkgs, mostly useful for servers that need fast
# security updates.
#
# Individual jobs can be tested by running:
#
#   nix-build nixos/release-small.nix -A <jobname>
#
{
  nixpkgs ? {
    outPath = (import ../lib).cleanSource ./..;
    revCount = 56789;
    shortRev = "gfedcba";
  },
  stableBranch ? false,
  supportedSystems ? [
    "aarch64-linux"
    "x86_64-linux"
  ], # no i686-linux
}:

let

  nixpkgsSrc = nixpkgs; # urgh

  pkgs = import ./.. { system = "x86_64-linux"; };

  lib = pkgs.lib;

  nixos' = import ./release.nix {
    inherit stableBranch supportedSystems;
    nixpkgs = nixpkgsSrc;
  };

  nixpkgs' = removeAttrs (import ../pkgs/top-level/release.nix {
    inherit supportedSystems;
    nixpkgs = nixpkgsSrc;
  }) [ "unstable" ];

in
rec {

  nixos = {
    inherit (nixos')
      channel
      manual
      options
      dummy
      ;
    tests = {
      acme = {
        inherit (nixos'.tests.acme)
          http01-builtin
          dns01
          ;
      };
      inherit (nixos'.tests)
        containers-imperative
        containers-ip
        firewall
        ipv6
        login
        misc
        nat
        nfs4
        openssh
        php
        predictable-interface-names
        proxy
        simple-container
        simple-vm
        ;
      latestKernel = {
        inherit (nixos'.tests.latestKernel)
          login
          ;
      };
      installer = {
        inherit (nixos'.tests.installer)
          lvm
          separateBoot
          simple
          simpleUefiSystemdBoot
          ;
      };
    };
  };

  nixpkgs = {
    inherit (nixpkgs')
      apacheHttpd
      cmake
      cryptsetup
      emacs
      gettext
      git
      imagemagick
      jdk
      linux
      mariadb
      nginx
      nodejs
      openssh
      opensshTest
      php
      postgresql
      python3
      release-checks
      rsyslog
      stdenv
      subversion
      tarball
      vim
      ;
    tests.stdenv = {
      inherit (nixpkgs'.tests.stdenv)
        tests-stdenv-gcc-stageCompare
        ;
    };
  };

  tested =
    let
      onSupported = x: map (system: "${x}.${system}") supportedSystems;
      onSystems =
        systems: x: map (system: "${x}.${system}") (pkgs.lib.intersectLists systems supportedSystems);
    in
    pkgs.releaseTools.aggregate {
      name = "nixos-${nixos.channel.version}";
      meta = {
        description = "Release-critical builds for the NixOS channel";
        maintainers = [ ];
      };
      constituents = lib.flatten [
        [
          "nixos.channel"
          "nixpkgs.tarball"
          "nixpkgs.release-checks"
        ]
        (map (onSystems [ "x86_64-linux" ]) [
          "nixos.tests.installer.lvm"
          "nixos.tests.installer.separateBoot"
          "nixos.tests.installer.simple"
        ])
        (map onSupported [
          "nixos.dummy"
          "nixos.manual"
          "nixos.tests.acme.http01-builtin"
          "nixos.tests.acme.dns01"
          "nixos.tests.containers-imperative"
          "nixos.tests.containers-ip"
          "nixos.tests.firewall"
          "nixos.tests.ipv6"
          "nixos.tests.installer.simpleUefiSystemdBoot"
          "nixos.tests.login"
          "nixos.tests.latestKernel.login"
          "nixos.tests.misc"
          "nixos.tests.nat.firewall"
          "nixos.tests.nat.standalone"
          "nixos.tests.nfs4.simple"
          "nixos.tests.openssh"
          "nixos.tests.php.fpm"
          "nixos.tests.php.pcre"
          "nixos.tests.predictable-interface-names.predictable"
          "nixos.tests.predictable-interface-names.predictableNetworkd"
          "nixos.tests.predictable-interface-names.unpredictable"
          "nixos.tests.predictable-interface-names.unpredictableNetworkd"
          "nixos.tests.proxy"
          "nixos.tests.simple-container"
          "nixos.tests.simple-vm"
          "nixpkgs.jdk"
          "nixpkgs.tests.stdenv.tests-stdenv-gcc-stageCompare"
          "nixpkgs.opensshTest"
        ])
      ];
    };

}