Skip to content

Commit cedc461

Browse files
authored
Update nix-tools github action (#1846)
* Update nix-tools github action * Run github actions on push to master * More fixes * ifdLevel 1 * ifdLevel 3 * Delete unused file * Fix github doc tests * Fix for latest hls * Fix for latest hls * Dodge broken .drv.lock file on CI
1 parent d61a3f4 commit cedc461

File tree

10 files changed

+44
-59
lines changed

10 files changed

+44
-59
lines changed

.github/workflows/pipeline.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- master
77

8+
push:
9+
branches:
10+
- master
11+
812
defaults:
913
run:
1014
shell: bash

docs/tutorials/development/nix/sources.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
"homepage": "https://input-output-hk.github.io/haskell.nix",
66
"owner": "input-output-hk",
77
"repo": "haskell.nix",
8-
"rev": "d20fc9dc2245a5f5d1d3dc898bf41e6f58b7486d",
9-
"sha256": "09qkfbxkrymcsiaydw6iyvpw14y5279863a25m62cxbb44hnqan3",
8+
"rev": "d61a3f429425e57108ca2b5355f10df94dafe39d",
9+
"sha256": "1fra8grb1jzfb794vm9kw090bb5kiq5g11xmb3nkm2lk60yixjx3",
1010
"type": "tarball",
11-
"url": "https://github.com/input-output-hk/haskell.nix/archive/d20fc9dc2245a5f5d1d3dc898bf41e6f58b7486d.tar.gz",
11+
"url": "https://github.com/input-output-hk/haskell.nix/archive/d61a3f429425e57108ca2b5355f10df94dafe39d.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"nixpkgs": {
15-
"branch": "release-21.05",
15+
"branch": "release-22.11",
1616
"description": "Nix Packages collection",
1717
"homepage": "",
1818
"owner": "NixOS",
1919
"repo": "nixpkgs",
20-
"rev": "5f244caea76105b63d826911b2a1563d33ff1cdc",
21-
"sha256": "1xlgynfw9svy7nvh9nkxsxdzncv9hg99gbvbwv3gmrhmzc3sar75",
20+
"rev": "b7ce17b1ebf600a72178f6302c77b6382d09323f",
21+
"sha256": "sha256-uNvD7fzO5hNlltNQUAFBPlcEjNG5Gkbhl/ROiX+GZU4=",
2222
"type": "tarball",
23-
"url": "https://github.com/NixOS/nixpkgs/archive/5f244caea76105b63d826911b2a1563d33ff1cdc.tar.gz",
23+
"url": "https://github.com/NixOS/nixpkgs/archive/b7ce17b1ebf600a72178f6302c77b6382d09323f.tar.gz",
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
}
2626
}

docs/tutorials/getting-started/nix/sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
"homepage": "https://input-output-hk.github.io/haskell.nix",
66
"owner": "input-output-hk",
77
"repo": "haskell.nix",
8-
"rev": "d20fc9dc2245a5f5d1d3dc898bf41e6f58b7486d",
9-
"sha256": "09qkfbxkrymcsiaydw6iyvpw14y5279863a25m62cxbb44hnqan3",
8+
"rev": "d61a3f429425e57108ca2b5355f10df94dafe39d",
9+
"sha256": "1fra8grb1jzfb794vm9kw090bb5kiq5g11xmb3nkm2lk60yixjx3",
1010
"type": "tarball",
11-
"url": "https://github.com/input-output-hk/haskell.nix/archive/d20fc9dc2245a5f5d1d3dc898bf41e6f58b7486d.tar.gz",
11+
"url": "https://github.com/input-output-hk/haskell.nix/archive/d61a3f429425e57108ca2b5355f10df94dafe39d.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"nixpkgs": {

modules/hackage-quirks.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ in [
6262
}
6363
constraints: hls-fourmolu-plugin <1.1.1.0, hls-rename-plugin <1.0.2.0, hls-stan-plugin <1.0.1.0
6464
''
65-
# TODO Remove this flag once the hls-haddock-comments-plugin is updated in hackage to work with ghc 9.2
65+
# TODO Remove this flag once the hls-call-hierarchy-plugin is updated in hackage to work with ghc 9.2
6666
+ lib.optionalString (__elem config.compiler-nix-name ["ghc921" "ghc922" "ghc923" "ghc924" "ghc925" "ghc926"]) ''
6767
package haskell-language-server
68-
flags: -haddockcomments
68+
flags: -callhierarchy
6969
'');
7070
}
7171
)

nix-tools/.buildkite/fixed.nix

Lines changed: 0 additions & 28 deletions
This file was deleted.

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

Lines changed: 23 additions & 15 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,17 +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
22-
23-
# Replace currently broken plan-to-nix output
24-
cp .buildkite/fixed.nix .buildkite/nix1/default.nix
29+
mv dist-newstyle/cabal-files .buildkite/nix1/cabal-files
2530

2631
echo
2732
echo "+++ Build project"
@@ -34,23 +39,26 @@ echo "There are no tests -- https://github.com/input-output-hk/haskell.nix/issue
3439
echo
3540
echo "+++ Add runtime dependencies to PATH"
3641

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
42+
nix build -f channel:nixos-22.11 nix-prefetch-scripts -o nix-prefetch-scripts
43+
nix build -f channel:nixos-22.11 git -o git
3944
export PATH="$PWD/nix-prefetch-scripts/bin:$PWD/git/bin:$PATH"
4045

4146
echo
42-
echo "+++ Run plan-to-nix again"
47+
echo "+++ Run make-install-plan and plan-to-nix again"
4348

4449
# This file can interfere with the build.
4550
# https://github.com/input-output-hk/haskell.nix/issues/57
4651
rm -f .nix-tools.cache
4752

53+
rm -rf dist-newstyle
54+
55+
nix build -f .buildkite/nix1 nix-tools.components.exes.make-install-plan
56+
./result/bin/make-install-plan
57+
4858
nix build -f .buildkite/nix1 nix-tools.components.exes.plan-to-nix
59+
rm -rf .buildkite/nix2
4960
./result/bin/plan-to-nix --output .buildkite/nix2 --plan-json dist-newstyle/cache/plan.json
50-
51-
# Add module needed to allow Cabal 3.2 to be installed
52-
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" \]; }\]|' \
53-
.buildkite/nix2/default.nix
61+
mv dist-newstyle/cabal-files .buildkite/nix2/cabal-files
5462

5563
echo
5664
echo "+++ Build project"

nix-tools/cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ index-state: 2022-11-06T00:00:00Z
22

33
packages: .
44

5-
allow-newer: hackage-db:Cabal, hpack:Cabal
5+
allow-newer: hackage-db:Cabal, hpack:Cabal, hnix:aeson, hnix:relude
66

77
source-repository-package
88
type: git

nix-tools/nix-tools.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ 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
34-
, aeson >= 2.0 && <2.1
34+
, aeson >= 2.0 && <2.2
3535
, aeson-pretty
3636
, base16-bytestring
3737
, bytestring

test/sublib-docs/sublib-docs.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ cabal-version: 2.2
33
-- init'. For further documentation, see
44
-- http://haskell.org/cabal/users-guide/
55

6+
67
name: sublib-docs
78
version: 0.1.0.0
89
-- synopsis:

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)