1
1
#! /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
3
3
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"
5
11
index_state=" 2020-01-10T00:00:00Z"
6
12
expected_hash=" 0z2jc4fibfxz88pfgjq3wk5j3v7sn34xkwb8h60hbwfwhhy63vx6"
7
13
@@ -11,14 +17,16 @@ set -euo pipefail
11
17
# https://github.com/input-output-hk/haskell.nix/issues/57
12
18
rm -f .nix-tools.cache
13
19
14
- echo " +++ Cabal configure "
20
+ echo " +++ Cabal update "
15
21
cabal new-update
16
- cabal new-configure
17
22
18
23
echo
19
- echo " +++ Run stable version of plan-to-nix"
24
+ echo " +++ Run stable version of make-install-plan and plan-to-nix"
20
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
26
+ ./nt/bin/make-install-plan
27
+ rm -rf .buildkite/nix1
21
28
./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
22
30
23
31
# Replace currently broken plan-to-nix output
24
32
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
34
42
echo
35
43
echo " +++ Add runtime dependencies to PATH"
36
44
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
39
47
export PATH=" $PWD /nix-prefetch-scripts/bin:$PWD /git/bin:$PATH "
40
48
41
49
echo
42
- echo " +++ Run plan-to-nix again"
50
+ echo " +++ Run make-install-plan and plan-to-nix again"
43
51
44
52
# This file can interfere with the build.
45
53
# https://github.com/input-output-hk/haskell.nix/issues/57
46
54
rm -f .nix-tools.cache
47
55
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
+
48
61
nix build -f .buildkite/nix1 nix-tools.components.exes.plan-to-nix
62
+ rm -rf .buildkite/nix2
49
63
./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
50
65
51
66
# Add module needed to allow Cabal 3.2 to be installed
52
67
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" \]; }\]|' \
0 commit comments