Skip to content

Commit 0540d74

Browse files
authored
More use of 22.11 to avoid GHA issues (input-output-hk#1938)
* Remove old workaround * Possible new work around * Possible new work around * Comments * Avoid GHA abbreviation
1 parent 5c872cf commit 0540d74

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

build.nix

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
, nixpkgsArgs ? haskellNix.nixpkgsArgs
77
, pkgs ? import nixpkgs nixpkgsArgs
88
, evalPackages ? import nixpkgs nixpkgsArgs
9-
, nixpkgsForHydra ? haskellNix.sources.nixpkgs-2105
10-
, pkgsForHydra ? import nixpkgsForHydra (nixpkgsArgs // { inherit (pkgs) system; })
9+
# This version is used to make our GitHub Action runners happy
10+
# Using `nixpkgs-unstable` currently results in:
11+
# version `GLIBCXX_3.4.30' not found
12+
, nixpkgsForGitHubAction ? haskellNix.sources.nixpkgs-2211
13+
, pkgsForGitHubAction ? import nixpkgsForGitHubAction (nixpkgsArgs // { inherit (pkgs) system; })
1114
, ifdLevel ? 1000
1215
, compiler-nix-name ? throw "No `compiler-nix-name` passed to build.nix"
1316
, haskellNix ? (import ./default.nix {})
@@ -75,12 +78,7 @@ in rec {
7578
update-docs = pkgs.buildPackages.callPackage ./scripts/update-docs.nix {
7679
generatedOptions = pkgs.callPackage ./scripts/options-doc.nix { };
7780
};
78-
# Because this is going to be used to test caching on hydra, it must not
79-
# use the darcs package from the haskell.nix we are testing. For that reason
80-
# it uses `pkgs.buildPackages.callPackage` not `haskell.callPackage`
81-
# (We could pull in darcs from a known good haskell.nix for hydra to
82-
# use)
83-
check-hydra = pkgsForHydra.buildPackages.callPackage ./scripts/check-hydra.nix {};
81+
check-hydra = pkgs.buildPackages.callPackage ./scripts/check-hydra.nix {};
8482
check-closure-size = pkgs.buildPackages.callPackage ./scripts/check-closure-size.nix {
8583
# Includes cabal-install since this is commonly used.
8684
nix-tools = pkgs.linkFarm "common-tools" [
@@ -89,21 +87,15 @@ in rec {
8987
];
9088
};
9189
check-materialization-concurrency = pkgs.buildPackages.callPackage ./scripts/check-materialization-concurrency/check.nix {};
92-
# Forcing nixpkgs-unstable here because this test makes a script
93-
# that when run will build `aeson` (used by `tests/cabal-simple`)
94-
# and we currently do not build that on hydra for nixpkgs-2205 (used by `pkgs`).
95-
# Using nixpkgs-unstable should allow buildkite to find what it needs
96-
# in the hydra cache when it runs the script.
97-
check-path-support = (import haskellNix.sources.nixpkgs-unstable nixpkgsArgs)
98-
.buildPackages.callPackage ./scripts/check-path-support.nix {
90+
check-path-support = pkgsForGitHubAction.buildPackages.callPackage ./scripts/check-path-support.nix {
9991
inherit compiler-nix-name;
10092
};
10193
};
10294

10395
# These are pure parts of maintainer-script so they can be built by hydra
10496
# and added to the cache to speed up buildkite.
10597
maintainer-script-cache = pkgs.recurseIntoAttrs (
106-
(pkgs.lib.optionalAttrs (pkgsForHydra.system == "x86_64-linux") {
98+
(pkgs.lib.optionalAttrs (pkgs.system == "x86_64-linux") {
10799
inherit (maintainer-scripts) check-hydra;
108100
})
109101
// (pkgs.lib.optionalAttrs (ifdLevel > 2) {

nix-tools/.buildkite/nix-tools-build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#! /usr/bin/env nix-shell
22
#! nix-shell -I "nixpkgs=channel:nixos-22.11" -i bash -p nixUnstable cabal-install ghc git nix-prefetch-git cacert
33

4+
# This file uses nixpkgs 22.11 to make our GHA runners happy
5+
# Using `nixpkgs-unstable` currently results in:
6+
# version `GLIBCXX_3.4.30' not found
7+
48
# The `nix-shell` is set to run without `--pure`.
59
# It is possible to use `--pure` if we need to, but it requires setting these.
610
# export LANG=en_US.UTF-8
@@ -22,7 +26,7 @@ cabal new-update
2226

2327
echo
2428
echo "+++ Run stable version of make-install-plan and plan-to-nix"
25-
nix build --impure --expr '(let haskellNix = import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}; in (import haskellNix.sources.nixpkgs haskellNix.nixpkgsArgs).haskell-nix.nix-tools.ghc8107)' -o nt
29+
nix build --impure --expr '(let haskellNix = import (builtins.fetchTarball "https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz") {}; in (import haskellNix.sources.nixpkgs-2211 haskellNix.nixpkgsArgs).haskell-nix.nix-tools.ghc8107)' -o nt
2630
./nt/bin/make-install-plan
2731
rm -rf .buildkite/nix1
2832
./nt/bin/plan-to-nix --output .buildkite/nix1 --plan-json dist-newstyle/cache/plan.json

0 commit comments

Comments
 (0)