1
- # 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluating
2
- # on a machine with e.g. no way to build the Darwin IFDs you need!
3
- { supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
4
- , ifdLevel ? 3
5
- , include ? ( compiler-nix-name : true )
6
- , checkMaterialization ? false } :
1
+ # TODO remove this file when we no longer need to build with the
2
+ # non flake hydra configuration.
3
+ {
4
+ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ] ,
5
+ } : let
6
+ defaultNix = import ./. { } ;
7
7
8
- let
9
- traceNames = prefix : builtins . mapAttrs ( n : v :
10
- if builtins . isAttrs v
11
- then if v ? type && v . type == "derivation"
12
- then __trace ( prefix + n ) v
13
- else traceNames ( prefix + n + "." ) v
14
- else v ) ;
15
- inherit ( import ./ci-lib.nix { pkgs = genericPkgs ; } ) stripAttrsForHydra filterDerivations ;
16
- genericPkgs = ( import ./. { } ) . pkgs ;
17
- lib = genericPkgs . lib ;
18
- ci = import ./ci.nix { inherit supportedSystems ifdLevel checkMaterialization ; restrictEval = true ; } ;
19
- allJobs = stripAttrsForHydra ( filterDerivations ci ) ;
20
- latestJobs = lib . optionalAttrs ( include "ghc8107" ) {
21
- # All the jobs are included in the `requiredJobs`, but the ones
22
- # added here will also included without aggregation, making it easier
23
- # to find a failing test. Keep in mind though that adding too many
24
- # of these will slow down eval times.
25
- x86_64-linux = allJobs . unstable . ghc8107 . x86_64-linux . native or { } ;
26
- x86_64-darwin = allJobs . unstable . ghc8107 . x86_64-darwin . native or { } ;
27
- } ;
28
- names = x : lib . filter ( n : n != "recurseForDerivations" && n != "meta" )
29
- ( builtins . attrNames x ) ;
30
- requiredJobs =
31
- builtins . listToAttrs (
32
- lib . concatMap ( nixpkgsVer :
33
- let nixpkgsJobs = allJobs . ${ nixpkgsVer } ;
34
- in lib . concatMap ( compiler-nix-name :
35
- let ghcJobs = nixpkgsJobs . ${ compiler-nix-name } ;
36
- in lib . optionals ( include compiler-nix-name ) ( builtins . concatMap ( platform :
37
- let platformJobs = ghcJobs . ${ platform } ;
38
- in builtins . map ( crossPlatform : {
39
- name = "required-${ nixpkgsVer } -${ compiler-nix-name } -${ platform } -${ crossPlatform } " ;
40
- value = genericPkgs . releaseTools . aggregate {
41
- name = "haskell.nix-${ nixpkgsVer } -${ compiler-nix-name } -${ platform } -${ crossPlatform } " ;
42
- meta . description = "All ${ nixpkgsVer } ${ compiler-nix-name } ${ platform } ${ crossPlatform } jobs" ;
43
- constituents = lib . collect ( d : lib . isDerivation d ) platformJobs . ${ crossPlatform } ;
44
- } ;
45
- } ) ( names platformJobs )
46
- ) ( names ghcJobs ) )
47
- ) ( names nixpkgsJobs )
48
- ) ( names allJobs ) ) ;
49
- in traceNames "job " ( latestJobs // requiredJobs // {
50
- windows-secp256k1 =
51
- let
52
- pkgs = ( import ./. { } ) . pkgs-unstable ;
53
- makeBinDist = drv : pkgs . runCommand drv . name {
54
- nativeBuildInputs = [ pkgs . zip ] ;
55
- } ''
56
- mkdir -p $out/nix-support
57
- cp -r ${ drv } /* .
58
- chmod -R +w .
59
- zip -r $out/${ drv . name } .zip .
60
- echo "file binary-dist $out/${ drv . name } .zip" > $out/nix-support/hydra-build-products
61
- '' ;
62
- in makeBinDist pkgs . pkgsCross . mingwW64 . secp256k1 ;
63
- required = genericPkgs . releaseTools . aggregate {
64
- name = "haskell.nix-required" ;
65
- meta . description = "All jobs required to pass CI" ;
66
- # Using the names here requires https://github.com/NixOS/hydra/issues/715
67
- constituents = builtins . attrNames requiredJobs ;
68
- } ;
69
- } )
8
+ inherit ( defaultNix ) pkgs ;
9
+ inherit ( pkgs ) lib ;
10
+
11
+ jobs = lib . getAttrs supportedSystems defaultNix . ciJobs ;
70
12
13
+ required = defaultNix . pkgs . releaseTools . aggregate {
14
+ name = "github-required" ;
15
+ meta . description = "All jobs required to pass CI" ;
16
+ constituents = lib . collect lib . isDerivation jobs ;
17
+ } ;
18
+ in
19
+ jobs // { inherit required ; }
0 commit comments