Skip to content

Commit a4798eb

Browse files
committed
Merge remote-tracking branch 'origin/master' into static-nix-tools
# Conflicts: # nix-tools/flake.lock
2 parents 4f9c628 + 52112cd commit a4798eb

File tree

155 files changed

+39180
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+39180
-257
lines changed

.github/workflows/lints.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
deadnix:
2424
runs-on: [self-hosted, linux]
2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- run: |
2828
nix run github:astro/deadnix -- --edit --no-lambda-pattern-names --exclude materialized
2929
TMPFILE=$(mktemp)

.github/workflows/pipeline.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,126 +21,126 @@ jobs:
2121
nix-build:
2222
runs-on: [self-hosted, linux]
2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
- name: "Run tests with ghc8107: Running the nix-build tests..."
2626
run: "./test/tests.sh ghc8107 nix-build"
2727

2828
unit-tests:
2929
runs-on: [self-hosted, linux]
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
- name: "Run tests with ghc8107: Running the unit tests..."
3333
run: "./test/tests.sh ghc8107 unit-tests"
3434

3535
runghc:
3636
runs-on: [self-hosted, linux]
3737
steps:
38-
- uses: actions/checkout@v3
38+
- uses: actions/checkout@v4
3939
- name: "Run tests with ghc8107: Checking that a nix-shell works for runghc..."
4040
run: "./test/tests.sh ghc8107 runghc"
4141

4242
cabal:
4343
runs-on: [self-hosted, linux]
4444
steps:
45-
- uses: actions/checkout@v3
45+
- uses: actions/checkout@v4
4646
- name: "Run tests with ghc8107: Checking that a nix-shell works for cabal..."
4747
run: "./test/tests.sh ghc8107 cabal"
4848

4949
cabal-doExactConfig:
5050
runs-on: [self-hosted, linux]
5151
steps:
52-
- uses: actions/checkout@v3
52+
- uses: actions/checkout@v4
5353
- name: "Run tests with ghc8107: Checking that a nix-shell works for cabal (doExactConfig component)..."
5454
run: "./test/tests.sh ghc8107 cabal-doExactConfig"
5555

5656
tests-benchmarks:
5757
runs-on: [self-hosted, linux]
5858
steps:
59-
- uses: actions/checkout@v3
59+
- uses: actions/checkout@v4
6060
- name: "Run tests with ghc8107: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks..."
6161
run: "./test/tests.sh ghc8107 tests-benchmarks"
6262

6363
multi-target:
6464
runs-on: [self-hosted, linux]
6565
steps:
66-
- uses: actions/checkout@v3
66+
- uses: actions/checkout@v4
6767
- name: "Run tests with ghc8107: Checking that a nix-shell works for a multi-target project..."
6868
run: "./test/tests.sh ghc8107 multi-target"
6969

7070
shellFor-single-package:
7171
runs-on: [self-hosted, linux]
7272
steps:
73-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v4
7474
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, multiple packages..."
7575
run: "./test/tests.sh ghc8107 shellFor-single-package"
7676

7777
shellFor-multiple-package:
7878
runs-on: [self-hosted, linux]
7979
steps:
80-
- uses: actions/checkout@v3
80+
- uses: actions/checkout@v4
8181
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package...y"
8282
run: "./test/tests.sh ghc8107 shellFor-multiple-package"
8383

8484
shellFor-hoogle:
8585
runs-on: [self-hosted, linux]
8686
steps:
87-
- uses: actions/checkout@v3
87+
- uses: actions/checkout@v4
8888
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package..."
8989
run: "./test/tests.sh ghc8107 shellFor-hoogle"
9090

9191
shellFor-not-depends:
9292
runs-on: [self-hosted, linux]
9393
steps:
94-
- uses: actions/checkout@v3
94+
- uses: actions/checkout@v4
9595
- name: "Run tests with ghc8107: Checking shellFor does not depend on given packages...y"
9696
run: "./test/tests.sh ghc8107 shellFor-not-depends"
9797

9898
maintainer-scripts:
9999
runs-on: [self-hosted, linux]
100100
steps:
101-
- uses: actions/checkout@v3
101+
- uses: actions/checkout@v4
102102
- name: "Run tests with ghc8107: Checking the maintainer scripts...y"
103103
run: "./test/tests.sh ghc8107 maintainer-scripts"
104104

105105
plan-extra-hackages:
106106
runs-on: [self-hosted, linux]
107107
steps:
108-
- uses: actions/checkout@v3
108+
- uses: actions/checkout@v4
109109
- name: "Run tests with ghc8107: Checking that plan construction works with extra Hackages..."
110110
run: "./test/tests.sh ghc8107 plan-extra-hackages"
111111

112112
build-extra-hackages:
113113
runs-on: [self-hosted, linux]
114114
steps:
115-
- uses: actions/checkout@v3
115+
- uses: actions/checkout@v4
116116
- name: "Run tests with ghc8107: Checking that package with extra Hackages can be build..."
117117
run: "./test/tests.sh ghc8107 build-extra-hackages"
118118

119119
hix:
120120
runs-on: [self-hosted, linux]
121121
steps:
122-
- uses: actions/checkout@v3
122+
- uses: actions/checkout@v4
123123
- name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..."
124124
run: "./test/tests.sh ghc8107 hix"
125125

126126
# template:
127127
# runs-on: [self-hosted, linux]
128128
# steps:
129-
# - uses: actions/checkout@v3
129+
# - uses: actions/checkout@v4
130130
# - name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..."
131131
# run: "./test/tests.sh ghc8107 template"
132132

133133
docs:
134134
runs-on: [self-hosted, linux]
135135
steps:
136-
- uses: actions/checkout@v3
136+
- uses: actions/checkout@v4
137137
- name: "Test examples in documentation ..."
138138
run: "./test/tests.sh ghc8107 docs"
139139

140140
hydra-ifdLevel-0-and-1:
141141
runs-on: [self-hosted, linux]
142142
steps:
143-
- uses: actions/checkout@v3
143+
- uses: actions/checkout@v4
144144
- name: "Check that jobset will evaluate in Hydra at ifdLevel 0 and 1"
145145
run: |
146146
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
@@ -150,7 +150,7 @@ jobs:
150150
hydra-ifdLevel-2:
151151
runs-on: [self-hosted, linux]
152152
steps:
153-
- uses: actions/checkout@v3
153+
- uses: actions/checkout@v4
154154
- name: "Check that jobset will evaluate in Hydra at ifdLevel 2"
155155
run: |
156156
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
@@ -159,7 +159,7 @@ jobs:
159159
hydra-ifdLevel-3-and-ghc-8-10:
160160
runs-on: [self-hosted, linux]
161161
steps:
162-
- uses: actions/checkout@v3
162+
- uses: actions/checkout@v4
163163
- name: "Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 8.10"
164164
run: |
165165
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
@@ -168,7 +168,7 @@ jobs:
168168
hydra-ifdLevel-3-and-ghc-9-2:
169169
runs-on: [self-hosted, linux]
170170
steps:
171-
- uses: actions/checkout@v3
171+
- uses: actions/checkout@v4
172172
- name: "Check that jobset will evaluate in Hydra at ifdLevel 3 and ghc 9.2"
173173
run: |
174174
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
@@ -177,7 +177,7 @@ jobs:
177177
hydra-ifdLevel-3-and-not-ghc-8-10-or-9-2:
178178
runs-on: [self-hosted, linux]
179179
steps:
180-
- uses: actions/checkout@v3
180+
- uses: actions/checkout@v4
181181
- name: "Check that jobset will evaluate in Hydra at ifdLevel 3 and not (ghc 8.10 or ghc 9.2)"
182182
run: |
183183
nix-build build.nix -A maintainer-scripts.check-hydra -o check-hydra.sh
@@ -186,7 +186,7 @@ jobs:
186186
closure-size:
187187
runs-on: [self-hosted, linux]
188188
steps:
189-
- uses: actions/checkout@v3
189+
- uses: actions/checkout@v4
190190
- name: "Check closure size with ghc8107"
191191
run: |
192192
nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8107 -o check-closure-size.sh
@@ -196,7 +196,7 @@ jobs:
196196
update-docs:
197197
runs-on: [self-hosted, linux]
198198
steps:
199-
- uses: actions/checkout@v3
199+
- uses: actions/checkout@v4
200200
- name: "Update docs"
201201
run: |
202202
nix-build build.nix -A maintainer-scripts.update-docs -o update-docs.sh
@@ -205,7 +205,7 @@ jobs:
205205
check-materialization-concurrency:
206206
runs-on: [self-hosted, linux]
207207
steps:
208-
- uses: actions/checkout@v3
208+
- uses: actions/checkout@v4
209209
- name: "Make sure materialize function does not limit concurrency"
210210
run: |
211211
nix-build build.nix -A maintainer-scripts.check-materialization-concurrency -o check-materialization-concurrency.sh
@@ -214,7 +214,7 @@ jobs:
214214
check-path-support:
215215
runs-on: [self-hosted, linux]
216216
steps:
217-
- uses: actions/checkout@v3
217+
- uses: actions/checkout@v4
218218
- name: "Make sure non store paths like can be used as src"
219219
run: |
220220
nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8107 -o check-path-support.sh
@@ -223,26 +223,26 @@ jobs:
223223
haskell-nix-roots-do-not-require-IFDs:
224224
runs-on: [self-hosted, linux]
225225
steps:
226-
- uses: actions/checkout@v3
226+
- uses: actions/checkout@v4
227227
- name: "Check that the haskell.nix roots do not require IFDs"
228228
run: nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false
229229

230230
hydra-without-remote-builders:
231231
runs-on: [self-hosted, linux]
232232
steps:
233-
- uses: actions/checkout@v3
233+
- uses: actions/checkout@v4
234234
- name: "Check that evaluation of hydra jobs works without using remote builders"
235235
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc8107-native --show-trace --builders ''
236236

237237
hix-cabal:
238238
runs-on: [self-hosted, linux]
239239
steps:
240-
- uses: actions/checkout@v3
240+
- uses: actions/checkout@v4
241241
- name: "Check hix -- run github:haskell/cabal/3.10#cabal-install:exe:cabal -- --version"
242242
run: "HIX_DIR=$(mktemp -d) nix run .#hix --accept-flake-config -- run github:haskell/cabal/3.10#cabal-install:exe:cabal --accept-flake-config --override-input haskellNix . -- --version"
243243

244244
nix-tools:
245245
runs-on: [self-hosted, linux]
246246
steps:
247-
- uses: actions/checkout@v3
247+
- uses: actions/checkout@v4
248248
- run: nix build ./nix-tools#checks.x86_64-linux.truncate-index --accept-flake-config

.github/workflows/updates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
update-pins:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313
- uses: cachix/install-nix-action@v15
1414
with:
1515
nix_path: nixpkgs=channel:nixos-unstable

builder/comp-builder.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs, stdenv, buildPackages, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, haddockBuilder, ghcForComponent, hsPkgs, compiler, runCommand, libffi, gmp, windows, zlib, ncurses, nodejs, nonReinstallablePkgs }@defaults:
1+
{ pkgs, stdenv, buildPackages, pkgsBuildBuild, ghc, lib, gobject-introspection ? null, haskellLib, makeConfigFiles, haddockBuilder, ghcForComponent, hsPkgs, compiler, runCommand, libffi, gmp, windows, zlib, ncurses, nodejs, nonReinstallablePkgs }@defaults:
22
lib.makeOverridable (
33
let self =
44
{ componentId
@@ -194,8 +194,8 @@ let
194194
++ lib.optional (!stdenv.hostPlatform.isGhcjs && builtins.compareVersions defaults.ghc.version "9.8" >= 0)
195195
"--with-ld=${stdenv.cc.bintools.targetPrefix}ld"
196196
++ lib.optionals (stdenv.hostPlatform.isGhcjs) [
197-
"--with-gcc=${buildPackages.emscripten}/bin/emcc"
198-
"--with-ld=${buildPackages.emscripten}/bin/emcc"
197+
"--with-gcc=${pkgsBuildBuild.emscripten}/bin/emcc"
198+
"--with-ld=${pkgsBuildBuild.emscripten}/bin/emcc"
199199
]
200200
++ [ # other flags
201201
(disableFeature dontStrip "executable-stripping")
@@ -635,7 +635,7 @@ let
635635
''))
636636
+ (lib.optionalString doCoverage ''
637637
mkdir -p $out/share
638-
cp -r dist/hpc $out/share
638+
cp -r dist/${lib.optionalString (builtins.compareVersions defaults.ghc.version "9.9" >= 0) "build/extra-compilation-artifacts/"}hpc $out/share
639639
cp dist/setup-config $out/
640640
'')
641641
}

builder/ghc-for-component-wrapper.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ let
125125
done
126126
127127
''
128+
+ lib.optionalString (stdenv.targetPlatform.isMusl && !haskellLib.isNativeMusl && builtins.compareVersions ghc.version "9.9" >0) ''
129+
ln -s $wrappedGhc/bin/${ghcCommand}-iserv $wrappedGhc/bin/ghc-iserv
130+
ln -s $wrappedGhc/bin/${ghcCommand}-iserv-prof $wrappedGhc/bin/ghc-iserv-prof
131+
''
128132
# Wrap haddock, if the base GHC provides it.
129133
+ ''
130134
if [[ -x "${haddock}/bin/haddock" ]]; then

builder/hspkg-builder.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ let
4646
pkgconfig = if components ? library then components.library.pkgconfig or [] else [];
4747
};
4848
inherit package name src flags patches defaultSetupSrc;
49-
inherit (pkg) preUnpack postUnpack;
49+
inherit (pkg) preUnpack postUnpack prePatch postPatch;
5050
} // lib.optionalAttrs (package.buildType != "Custom") {
5151
nonReinstallablePkgs = ["base" "Cabal"];
5252
});

builder/setup-builder.nix

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
let self =
44
{ component, package, name, src, enableDWARF ? false, flags ? {}, revision ? null, patches ? [], defaultSetupSrc
55
, preUnpack ? component.preUnpack, postUnpack ? component.postUnpack
6-
, prePatch ? null, postPatch ? null
6+
, prePatch ? component.prePatch, postPatch ? component.postPatch
77
, preBuild ? component.preBuild , postBuild ? component.postBuild
88
, preInstall ? component.preInstall , postInstall ? component.postInstall
99
, cleanSrc ? haskellLib.cleanCabalComponent package component "setup" src
@@ -24,9 +24,22 @@ let
2424
inherit fullName flags component enableDWARF nonReinstallablePkgs;
2525
};
2626
hooks = haskellLib.optionalHooks {
27+
prePatch =
28+
# If the package is in a sub directory `cd` there first.
29+
# In some cases the `cleanSrc.subDir` will be empty and the `.cabal`
30+
# file will be in the root of `src` (`cleanSrc.root`). This
31+
# will happen when:
32+
# * the .cabal file is in the projects `src.origSrc or src`
33+
# * the package src was overridden with a value that does not
34+
# include an `origSubDir`
35+
(lib.optionalString (cleanSrc'.subDir != "") ''
36+
cd ${lib.removePrefix "/" cleanSrc'.subDir}
37+
''
38+
) + lib.optionalString (prePatch != null) "\n${prePatch}";
39+
2740
inherit
2841
preUnpack postUnpack
29-
prePatch postPatch
42+
postPatch
3043
preBuild postBuild
3144
preInstall postInstall
3245
;
@@ -109,14 +122,12 @@ let
109122
diff ./Setup $out/bin/Setup
110123
'';
111124
}
112-
// (lib.optionalAttrs (cleanSrc'.subDir != "") {
113-
prePatch =
114-
# If the package is in a sub directory `cd` there first
115-
''
116-
cd ${lib.removePrefix "/" cleanSrc'.subDir}
117-
'';
118-
})
119-
// (lib.optionalAttrs (patches != []) { patches = map (p: if builtins.isFunction p then p { inherit (package.identifier) version; } else p) patches; })
125+
// lib.optionalAttrs (patches != []) {
126+
patches = map (p:
127+
if builtins.isFunction p
128+
then p { inherit (package.identifier) version; }
129+
else p) patches;
130+
}
120131
// hooks
121132
);
122133
in drv; in self

ci.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
ghc96llvm = true;
7474
ghc98 = true;
7575
ghc98llvm = true;
76-
# ghc98X = true; Disabled for now as there are no changes since 9.8.1 release yet and the current source does not boot with 9.8.1
77-
ghc99 = true;
76+
ghc910X = true;
77+
ghc911 = true;
7878
})));
7979
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name:
8080
# We need to use the actual nixpkgs version we're working with here, since the values

0 commit comments

Comments
 (0)