Skip to content

Commit 8b343a9

Browse files
committed
Update nix-tools github action
1 parent 4952abb commit 8b343a9

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

nix-tools/.buildkite/fixed.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let
88
plan-pkgs = import ./pkgs.nix;
99
pkg-def-extras = [];
1010
modules = [{
11-
nonReinstallablePkgs= [ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base"
11+
nonReinstallablePkgs= [ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base" "ghc-bignum"
1212
"deepseq" "array" "ghc-boot-th" "pretty" "template-haskell"
1313
# ghcjs custom packages
1414
"ghcjs-prim" "ghcjs-th"

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

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#! /usr/bin/env nix-shell
2-
#! nix-shell -I "nixpkgs=channel:nixos-21.11" --pure -i bash -p nixUnstable cabal-install ghc git nix-prefetch-git cacert
2+
#! nix-shell -I "nixpkgs=channel:nixos-22.11" -i bash -p nixUnstable cabal-install ghc git nix-prefetch-git cacert
33

4-
export NIX_PATH="nixpkgs=channel:nixos-21.11"
4+
# The `nix-shell` is set to run without `--pure`.
5+
# It is possible to use `--pure` if we need to, but it requires setting these.
6+
# export LANG=en_US.UTF-8
7+
# export LC_ALL=en_US.UTF-8
8+
# export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
9+
10+
export NIX_PATH="nixpkgs=channel:nixos-22.11"
511
index_state="2020-01-10T00:00:00Z"
612
expected_hash="0z2jc4fibfxz88pfgjq3wk5j3v7sn34xkwb8h60hbwfwhhy63vx6"
713

@@ -11,14 +17,16 @@ set -euo pipefail
1117
# https://github.com/input-output-hk/haskell.nix/issues/57
1218
rm -f .nix-tools.cache
1319

14-
echo "+++ Cabal configure"
20+
echo "+++ Cabal update"
1521
cabal new-update
16-
cabal new-configure
1722

1823
echo
19-
echo "+++ Run stable version of plan-to-nix"
24+
echo "+++ Run stable version of make-install-plan and plan-to-nix"
2025
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
26+
./nt/bin/make-install-plan
27+
rm -rf .buildkite/nix1
2128
./nt/bin/plan-to-nix --output .buildkite/nix1 --plan-json dist-newstyle/cache/plan.json
29+
mv dist-newstyle/cabal-files .buildkite/nix1/cabal-files
2230

2331
# Replace currently broken plan-to-nix output
2432
cp .buildkite/fixed.nix .buildkite/nix1/default.nix
@@ -34,19 +42,26 @@ echo "There are no tests -- https://github.com/input-output-hk/haskell.nix/issue
3442
echo
3543
echo "+++ Add runtime dependencies to PATH"
3644

37-
nix build -f channel:nixos-20.03 nix-prefetch-scripts -o nix-prefetch-scripts
38-
nix build -f channel:nixos-20.03 git -o git
45+
nix build -f channel:nixos-22.11 nix-prefetch-scripts -o nix-prefetch-scripts
46+
nix build -f channel:nixos-22.11 git -o git
3947
export PATH="$PWD/nix-prefetch-scripts/bin:$PWD/git/bin:$PATH"
4048

4149
echo
42-
echo "+++ Run plan-to-nix again"
50+
echo "+++ Run make-install-plan and plan-to-nix again"
4351

4452
# This file can interfere with the build.
4553
# https://github.com/input-output-hk/haskell.nix/issues/57
4654
rm -f .nix-tools.cache
4755

56+
rm -rf dist-newstyle
57+
58+
nix build -f .buildkite/nix1 nix-tools.components.exes.make-install-plan
59+
./result/bin/make-install-plan
60+
4861
nix build -f .buildkite/nix1 nix-tools.components.exes.plan-to-nix
62+
rm -rf .buildkite/nix2
4963
./result/bin/plan-to-nix --output .buildkite/nix2 --plan-json dist-newstyle/cache/plan.json
64+
mv dist-newstyle/cabal-files .buildkite/nix2/cabal-files
5065

5166
# Add module needed to allow Cabal 3.2 to be installed
5267
sed -i -e 's|modules = \[\]|modules = \[{ nonReinstallablePkgs = \[ "rts" "ghc-heap" "ghc-prim" "integer-gmp" "integer-simple" "base" "deepseq" "array" "ghc-boot-th" "pretty" "template-haskell" "ghcjs-prim" "ghcjs-th" "ghc-boot" "ghc" "Win32" "array" "binary" "bytestring" "containers" "directory" "filepath" "ghc-boot" "ghc-compact" "ghc-prim" "hpc" "mtl" "parsec" "process" "text" "time" "transformers" "unix" "xhtml" "stm" "terminfo" \]; }\]|' \

nix-tools/nix-tools.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ library
2828
, Stack2nix.External.Resolve
2929
, Stack2nix.Project
3030
, Stack2nix.Stack
31-
build-depends: base >= 4 && <4.15
31+
build-depends: base >= 4 && <4.16
3232
, Cabal >= 3.8 && <3.9
3333
, Cabal-syntax >= 3.8 && <3.9
3434
, aeson >= 2.0 && <2.1

test/tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /usr/bin/env nix-shell
2-
#! nix-shell -i bash -p bash jq nix gnused
2+
#! nix-shell -I "nixpkgs=channel:nixos-22.11" -i bash -p bash jq nix gnused
33

44
set -euo pipefail
55

0 commit comments

Comments
 (0)