Skip to content

Commit 9499917

Browse files
committed
Merge remote-tracking branch 'origin/master' into hkm/combined-derivations
# Conflicts: # release.nix
2 parents e894bc2 + c83b33f commit 9499917

File tree

8 files changed

+53
-25
lines changed

8 files changed

+53
-25
lines changed

.buildkite/pipeline.yml

+31-5
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,39 @@ steps:
7474
agents:
7575
system: x86_64-linux
7676

77-
- label: 'Check that jobset will evaluate in Hydra'
77+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 0 and 1'
7878
command:
7979
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
80-
- ./check-hydra.sh 0
81-
- ./check-hydra.sh 1
82-
- ./check-hydra.sh 2
83-
- ./check-hydra.sh 3
80+
- ./check-hydra.sh --arg ifdLevel 0
81+
- ./check-hydra.sh --arg ifdLevel 1
82+
agents:
83+
system: x86_64-linux
84+
85+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 2'
86+
command:
87+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
88+
- ./check-hydra.sh --arg ifdLevel 2
89+
agents:
90+
system: x86_64-linux
91+
92+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 8.10'
93+
command:
94+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
95+
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 6 x == \"ghc810\"'"
96+
agents:
97+
system: x86_64-linux
98+
99+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 9.2'
100+
command:
101+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
102+
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: __substring 0 5 x == \"ghc92\"'"
103+
agents:
104+
system: x86_64-linux
105+
106+
- label: 'Check that jobset will evaluate in Hydra at ifdLevel 3 and not (ghc 8.10 or ghc 9.2)'
107+
command:
108+
- nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
109+
- "./check-hydra.sh --arg ifdLevel 3 --arg include 'x: !(__substring 0 6 x == \"ghc810\" || __substring 0 5 x == \"ghc92\")'"
84110
agents:
85111
system: x86_64-linux
86112

build.nix

+9-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
let
66
haskellNix = (import ./default.nix {});
77
in
8-
{ nixpkgs ? haskellNix.sources.nixpkgs-2111
8+
{ nixpkgs ? haskellNix.sources.nixpkgs-2205
99
, nixpkgsArgs ? haskellNix.nixpkgsArgs
1010
, pkgs ? import nixpkgs nixpkgsArgs
1111
, evalPackages ? import nixpkgs nixpkgsArgs
@@ -76,10 +76,14 @@ in rec {
7676
];
7777
};
7878
check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};
79-
check-path-support = pkgs.buildPackages.callPackage ./scripts/check-path-support.nix {
80-
# TODO remove this when nixpkgs-2205 is released and used for `pkgs`
81-
# check-path-support fails unless we have nix 2.4 or newer.
82-
inherit (import haskellNix.sources.nixpkgs-unstable {}) nix;
79+
# Forcing nixpkgs-unstable here because this test makes a script
80+
# that when run will build `aeson` (used by `tests/cabal-simple`)
81+
# and we currently do not build that on hydra for nixpkgs-2205 (used by `pkgs`).
82+
# Using nixpkgs-unstable should allow buildkite to find what it needs
83+
# in the hydra cache when it runs the script.
84+
check-path-support = (import haskellNix.sources.nixpkgs-unstable nixpkgsArgs)
85+
.buildPackages.callPackage ./scripts/check-path-support.nix {
86+
inherit compiler-nix-name;
8387
};
8488
};
8589

flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mkdocs.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ site_name: Alternative Haskell Infrastructure for Nixpkgs
1313
theme: readthedocs
1414
site_url: null
1515
repo_url: https://github.com/input-output-hk/haskell.nix
16-
permalink: true
1716
markdown_extensions:
1817
- admonition
1918
- footnotes
2019
- tables
2120
- toc:
2221
permalink: true
2322

24-
# this is called `nav` in more recent mkdocs versions. Mine
25-
# right now is 0.17.5
26-
pages:
23+
nav:
2724
- 'Introduction': index.md
2825
- 'Motivation': motivation.md
2926
- 'Architecture': architecture.md

release.nix

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# on a machine with e.g. no way to build the Darwin IFDs you need!
33
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
44
, ifdLevel ? 0
5+
, include ? (compiler-nix-name: true)
56
, checkMaterialization ? false }:
67

78
let
@@ -16,7 +17,7 @@ let
1617
lib = genericPkgs.lib;
1718
ci = import ./ci.nix { inherit supportedSystems ifdLevel checkMaterialization; restrictEval = true; };
1819
allJobs = stripAttrsForHydra (filterDerivations ci);
19-
latestJobs = {
20+
latestJobs = lib.optionalAttrs (include "ghc8107") {
2021
# All the jobs are included in the `requiredJobs`, but the ones
2122
# added here will also included without aggregation, making it easier
2223
# to find a failing test. Keep in mind though that adding too many
@@ -32,7 +33,7 @@ let
3233
let nixpkgsJobs = allJobs.${nixpkgsVer};
3334
in lib.concatMap (compiler-nix-name:
3435
let ghcJobs = nixpkgsJobs.${compiler-nix-name};
35-
in builtins.concatMap (platform:
36+
in lib.optionals (include compiler-nix-name) (builtins.concatMap (platform:
3637
let platformJobs = ghcJobs.${platform};
3738
in builtins.map (crossPlatform: {
3839
name = "required-${nixpkgsVer}-${compiler-nix-name}-${platform}-${crossPlatform}";
@@ -42,7 +43,7 @@ let
4243
constituents = lib.collect (d: lib.isDerivation d) platformJobs.${crossPlatform};
4344
};
4445
}) (names platformJobs)
45-
) (names ghcJobs)
46+
) (names ghcJobs))
4647
) (names nixpkgsJobs)
4748
) (names allJobs));
4849
in traceNames "job " (latestJobs // requiredJobs // {

scripts/check-hydra.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ writeScript "check-hydra.sh" ''
1010
export PATH="${makeBinPath [ coreutils time gnutar gzip hydra-unstable jq gitMinimal ]}"
1111
export NIX_PATH=
1212
13-
echo '~~~ Evaluating release.nix with --arg ifdLevel '$1
13+
echo '~~~ Evaluating release.nix with' "$@"
1414
command time --format '%e' -o eval-time.txt \
1515
hydra-eval-jobs \
1616
--option allowed-uris "https://github.com/NixOS https://github.com/input-output-hk" \
1717
--arg supportedSystems '[ builtins.currentSystem ]' \
18-
--arg ifdLevel $1 \
18+
"$@" \
1919
-I $(realpath .) release.nix > eval.json
2020
EVAL_EXIT_CODE="$?"
2121
if [ "$EVAL_EXIT_CODE" != 0 ]

scripts/check-path-support.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ stdenv, lib, writeScript, coreutils, gnutar, gzip, nix, gitMinimal }:
1+
{ stdenv, lib, writeScript, coreutils, gnutar, gzip, nix, gitMinimal, compiler-nix-name }:
22

33
with lib;
44

@@ -9,5 +9,5 @@ writeScript "check-path-supprot.sh" ''
99
1010
export PATH="${makeBinPath [ coreutils gnutar gzip nix gitMinimal ]}"
1111
12-
nix-build -E '((import ./. {}).pkgs.haskell-nix.cabalProject { compiler-nix-name = "ghc865"; src = ./test/cabal-simple; }).cabal-simple.components.library'
12+
nix-build -E '((import ./. {}).pkgs.haskell-nix.cabalProject { compiler-nix-name = "${compiler-nix-name}"; src = ./test/cabal-simple; }).cabal-simple.components.library'
1313
''

scripts/update-external.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ in
3535
3636
cd ..
3737
38-
nix flack lock --accept-flake-config \
38+
nix flake lock --accept-flake-config \
3939
--experimental-features 'nix-command flakes' \
4040
--update-input ${name}
4141
''

0 commit comments

Comments
 (0)