about summary refs log tree commit diff
path: root/pkgs/top-level/release.nix
blob: 0c7c67a0d03b8b3d95bdbc406e9cd5890ed088f5 (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
/* This file defines the builds that constitute the Nixpkgs.
   Everything defined here ends up in the Nixpkgs channel.  Individual
   jobs can be tested by running:

   $ nix-build pkgs/top-level/release.nix -A <jobname>.<system>

   e.g.

   $ nix-build pkgs/top-level/release.nix -A coreutils.x86_64-linux
*/

{ nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; }
, officialRelease ? false
, # The platforms for which we build Nixpkgs.
  supportedSystems ? [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ]
, # Strip most of attributes when evaluating to spare memory usage
  scrubJobs ? true
, # Attributes passed to nixpkgs. Don't build packages marked as unfree.
  nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; }; }
}:

with import ./release-lib.nix { inherit supportedSystems scrubJobs nixpkgsArgs; };

let
  jobs =
    { tarball = import ./make-tarball.nix { inherit pkgs nixpkgs officialRelease; };

      metrics = import ./metrics.nix { inherit pkgs nixpkgs; };

      manual = import ../../doc;
      lib-tests = import ../../lib/tests/release.nix { inherit pkgs; };

      darwin-tested = pkgs.releaseTools.aggregate
        { name = "nixpkgs-darwin-${jobs.tarball.version}";
          meta.description = "Release-critical builds for the Nixpkgs darwin channel";
          constituents =
            [ jobs.tarball
              jobs.stdenv.x86_64-darwin
              jobs.ghc.x86_64-darwin
              jobs.cabal2nix.x86_64-darwin
              jobs.ruby.x86_64-darwin
              jobs.python.x86_64-darwin
              jobs.rustc.x86_64-darwin
              jobs.go.x86_64-darwin
              jobs.tests.macOSSierraShared
            ];
        };

      unstable = pkgs.releaseTools.aggregate
        { name = "nixpkgs-${jobs.tarball.version}";
          meta.description = "Release-critical builds for the Nixpkgs unstable channel";
          constituents =
            [ jobs.tarball
              jobs.metrics
              jobs.manual
              jobs.lib-tests
              jobs.stdenv.x86_64-linux
              jobs.stdenv.i686-linux
              jobs.stdenv.x86_64-darwin
              jobs.linux.x86_64-linux
              jobs.linux.i686-linux
              jobs.python.x86_64-linux
              jobs.python.i686-linux
              jobs.python.x86_64-darwin
              jobs.python3.x86_64-linux
              jobs.python3.i686-linux
              jobs.python3.x86_64-darwin
              # Many developers use nix-repl
              jobs.nix-repl.x86_64-linux
              jobs.nix-repl.i686-linux
              jobs.nix-repl.x86_64-darwin
              # Needed by travis-ci to test PRs
              jobs.nox.i686-linux
              jobs.nox.x86_64-linux
              jobs.nox.x86_64-darwin
              # Ensure that X11/GTK+ are in order.
              jobs.thunderbird.x86_64-linux
              jobs.thunderbird.i686-linux
              # Ensure that basic stuff works on darwin
              jobs.git.x86_64-darwin
              jobs.mysql.x86_64-darwin
              jobs.vim.x86_64-darwin
            ] ++ lib.collect lib.isDerivation jobs.stdenvBootstrapTools;
        };
    } // (lib.optionalAttrs (builtins.elem "i686-linux" supportedSystems) {
      stdenvBootstrapTools.i686-linux =
        { inherit (import ../stdenv/linux/make-bootstrap-tools.nix { system = "i686-linux"; }) dist test; };
    }) // (lib.optionalAttrs (builtins.elem "x86_64-linux" supportedSystems) {
      stdenvBootstrapTools.x86_64-linux =
        { inherit (import ../stdenv/linux/make-bootstrap-tools.nix { system = "x86_64-linux"; }) dist test; };
    }) // (lib.optionalAttrs (builtins.elem "aarch64-linux" supportedSystems) {
      stdenvBootstrapTools.aarch64-linux =
        { inherit (import ../stdenv/linux/make-bootstrap-tools.nix { system = "aarch64-linux"; }) dist test; };
    }) // (lib.optionalAttrs (builtins.elem "x86_64-darwin" supportedSystems) {
      stdenvBootstrapTools.x86_64-darwin =
        let
          bootstrap = import ../stdenv/darwin/make-bootstrap-tools.nix { system = "x86_64-darwin"; };
        in {
          # Lightweight distribution and test
          inherit (bootstrap) dist test;
          # Test a full stdenv bootstrap from the bootstrap tools definition
          inherit (bootstrap.test-pkgs) stdenv;
        };
    }) // (mapTestOn ((packagePlatforms pkgs) // rec {
      haskell.compiler = packagePlatforms pkgs.haskell.compiler;
      haskellPackages = packagePlatforms pkgs.haskellPackages;

      # Language packages disabled in https://github.com/NixOS/nixpkgs/commit/ccd1029f58a3bb9eca32d81bf3f33cb4be25cc66

      #emacsPackagesNg = packagePlatforms pkgs.emacsPackagesNg;
      #rPackages = packagePlatforms pkgs.rPackages;
      ocamlPackages = { };
      perlPackages = { };
      pythonPackages = {
        blaze = unix;
        pandas = unix;
        scikitlearn = unix;
      };
      python2Packages = { };
      python27Packages = { };
      python3Packages = { };
      python35Packages = {
        blaze = unix;
        pandas = unix;
        scikitlearn = unix;
      };
      python36Packages = {
        blaze = unix;
        pandas = unix;
        scikitlearn = unix;
      };

    } ));

in jobs