Skip to content

Commit af62a32

Browse files
committed
Merge remote-tracking branch 'origin/master' into hkm/combined-derivations
# Conflicts: # builder/make-config-files.nix
2 parents 82cda52 + 3c9acea commit af62a32

File tree

17 files changed

+73
-60
lines changed

17 files changed

+73
-60
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ docs/reference/modules.md
66
result*
77
/nt
88

9+
# https://github.com/nix-community/nix-direnv
10+
.direnv
11+
912
# Created by https://www.gitignore.io/api/haskell,emacs,vim
1013

1114
### Emacs ###

build.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ in rec {
3434
"ghc884" = "3.3.6";
3535
}.compiler-nix-name or "latest";
3636
};
37-
} // pkgs.lib.optionalAttrs (!__elem compiler-nix-name ["ghc921" "ghc922" "ghc923" "ghc924"]) {
3837
hls-latest = tool compiler-nix-name "haskell-language-server" { inherit evalPackages; };
3938
})
4039
);

ci.nix

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
inherit (import ./ci-lib.nix { inherit pkgs; }) dimension platformFilterGeneric filterAttrsOnlyRecursive;
1111
inherit (pkgs.haskell-nix) sources;
1212
nixpkgsVersions = {
13-
"R2111" = "nixpkgs-2111";
1413
"R2205" = "nixpkgs-2205";
1514
"unstable" = "nixpkgs-unstable";
1615
};
@@ -30,17 +29,14 @@
3029
# cabal-install and nix-tools plans. When removing a ghc version
3130
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
3231
# Update supported-ghc-versions.md to reflect any changes made here.
33-
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2111") {
32+
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2205") {
3433
ghc865 = false;
35-
ghc8107 = true;
36-
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2205") {
37-
ghc865 = false;
38-
ghc8107 = true;
34+
ghc8107 = false;
3935
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
4036
ghc865 = false;
4137
ghc884 = false; # Native version is used to boot 9.0.1
4238
ghc8107 = true;
43-
ghc902 = true;
39+
ghc902 = false;
4440
ghc924 = true;
4541
});
4642
systems = nixpkgsName: nixpkgs: compiler-nix-name: nixpkgs.lib.genAttrs (

docs/reference/supported-ghc-versions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ really should use an instance of Nixpkgs provided by `haskell.nix` itself.
2121

2222
| Nixpkgs version | Nixpkgs pinning | GHC version | `compiler-nix-name` | Tested in CI? |
2323
|------------------|--------------------|-------------|-----------------------|---------------|
24-
| 21.11 | `nixpkgs-2111` | 8.6.5 | `ghc865` | No |
25-
| 21.11 | `nixpkgs-2111` | 8.10.7 | `ghc8107` | Yes |
24+
| 22.05 | `nixpkgs-2205` | 8.6.5 | `ghc865` | No |
25+
| 22.05 | `nixpkgs-2205` | 8.10.7 | `ghc8107` | No |
2626
| unstable | `nixpkgs-unstable` | 8.6.5 | `ghc865` | No |
2727
| unstable | `nixpkgs-unstable` | 8.8.4 | `ghc884` | No |
2828
| unstable | `nixpkgs-unstable` | 8.10.7 | `ghc8107` | Yes |
29-
| unstable | `nixpkgs-unstable` | 9.0.2 | `ghc902` | Yes |
29+
| unstable | `nixpkgs-unstable` | 9.0.2 | `ghc902` | No |
3030
| unstable | `nixpkgs-unstable` | 9.2.4 | `ghc924` | Yes |
3131

3232
See [ci.nix](https://github.com/input-output-hk/haskell.nix/blob/master/ci.nix)

docs/tutorials/development.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Emacs to use it. The way I do it is:
175175

176176
## Using `nix repl`
177177

178-
It's sometimes useful to load [Haskell.nix][] in the REPL to explore
178+
It's sometimes useful to load [Haskell.nix][] in the [REPL](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-repl.html) to explore
179179
attrsets and try examples.
180180

181181
```
@@ -190,19 +190,19 @@ rec {
190190
Load the example file:
191191

192192
```
193-
$ nix repl '<nixpkgs>' example.nix
194-
Welcome to Nix version 2.3pre6631_e58a7144. Type :? for help.
193+
$ nix repl
194+
Welcome to Nix 2.10.3. Type :? for help.
195195
196-
Loading '<nixpkgs>'...
197-
Added 10403 variables.
196+
nix-repl> :l <nixpkgs>
197+
Added 16938 variables.
198198
199-
Loading 'example.nix'...
199+
nix-repl> :l example.nix
200200
Added 2 variables.
201201
202202
nix-repl> lib.take 5 pkgNames
203-
[ "ALUT" "ANum" "Allure" "Boolean" "BoundedChan" ]
203+
[ "AC-Angle" "ALUT" "ANum" "Agda" "Allure" ]
204204
205-
nix-repl>
205+
nix-repl> :q
206206
```
207207

208208
Now that you have `nix-tools` and are able to import [Haskell.nix][],

docs/tutorials/getting-started-flakes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ Add `flake.nix`:
9292
];
9393
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
9494
flake = pkgs.helloProject.flake {
95-
# This adds support for `nix build .#js-unknown-ghcjs-cabal:hello:exe:hello`
95+
# This adds support for `nix build .#js-unknown-ghcjs:hello:exe:hello`
9696
# crossPlatforms = p: [p.ghcjs];
9797
};
9898
in flake // {
9999
# Built by `nix build .`
100-
defaultPackage = flake.packages."hello:exe:hello";
100+
packages.${system}.default = flake.packages."hello:exe:hello";
101101
});
102102
}
103103
```

docs/tutorials/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IMPORTANT: you *must* do this or you *will* build several copies of GHC!
1414

1515
You can configure Nix to use our binary cache, which is pushed to by CI, so should contain the artifacts that you need.
1616

17-
You need to add the following sections to `/etc/nix/nix.conf` or, if you are a trusted user, `~/.config/nix/nix.conf` (if you don't know what a "trusted user" is, you probably want to do the former).
17+
You need to add the following sections to `/etc/nix/nix.conf` or, if you are a trusted user, `~/.config/nix/nix.conf` (if you don't know what a "trusted user" is, you probably want to do the former). `[...]` denote any existing entries.
1818

1919
```
2020
trusted-public-keys = [...] hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= [...]

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137

138138
packages = ((self.internal.compat { inherit system; }).hix).apps;
139139

140-
devShell = with self.legacyPackages.${system};
140+
devShells.${system}.default = with self.legacyPackages.${system};
141141
mkShell {
142142
buildInputs = [
143143
nixUnstable

modules/configuration-nix.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ in {
6060
packages.ghc-lib-parser.patches = [
6161
(fromUntil "8.10.0.0" "9.2" ../overlays/patches/ghc-lib-parser-8.10-global-unique-counters-in-rts.patch)
6262
(fromUntil "9.2.0.0" "9.3" ../overlays/patches/ghc-lib-parser-9.2-global-unique-counters-in-rts.patch)
63+
(fromUntil "9.4.0.0" "9.5" ../overlays/patches/ghc-lib-parser-9.4-global-unique-counters-in-rts.patch)
6364
];
6465

6566
# See https://github.com/haskell-nix/hnix/pull/1053

modules/hackage-quirks.nix

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ let
55
# Easier than importing nixpkgs just for this
66
mapAttrsToList = f: attrs:
77
map (name: f name attrs.${name}) (__attrNames attrs);
8-
in [(
9-
{config, lib, pkgs, ...}:
8+
in [
9+
({config, lib, pkgs, ...}:
1010
{ _file = "haskell.nix/overlays/hackage-quirks.nix#cabal-install"; } //
1111
# FIXME: this is required to build cabal-install 3.2 with ghc 8.6,
1212
# but also for
@@ -23,25 +23,34 @@ in [(
2323
packages.cabal-install.src = pkgs.buildPackages.haskell-nix.sources.cabal-32 + "/cabal-install";
2424
})
2525
];
26-
})]
26+
}
27+
)
28+
29+
# TODO remove this when `dependent-sum-0.7.1.0` constraint on `some` has been updated.
30+
# See https://github.com/haskell/haskell-language-server/issues/2969
31+
# and https://github.com/obsidiansystems/dependent-sum/issues/71
32+
({config, lib, pkgs, ...}:
33+
{ _file = "haskell.nix/overlays/hackage-quirks.nix#haskell-language-server"; } //
34+
lib.mkIf (config.name == "haskell-language-server") {
35+
cabalProject = lib.mkDefault (''
36+
packages: .
37+
constraints: dependent-sum >=0.7.1.0
38+
''
39+
# TODO Remove this flag once the hls-haddock-comments-plugin is updated in hackage to work with ghc 9.2
40+
+ lib.optionalString (__elem config.compiler-nix-name ["ghc921" "ghc922" "ghc923" "ghc924"]) ''
41+
package haskell-language-server
42+
flags: -haddockcomments
43+
'');
44+
}
45+
)
2746

2847
# Map the following into modules that use `mkIf` to check the name of the
2948
# hackage package in a way that is lazy enought not to cause infinite recursion
3049
# issues.
31-
++ mapAttrsToList (n: v: {config, lib, ...}:
50+
] ++ mapAttrsToList (n: v: {config, lib, ...}:
3251
{ _file = "haskell.nix/overlays/hackage-quirks.nix#${n}"; } //
3352
lib.mkIf (n == config.name) v) {
3453

35-
# TODO remove this when `dependent-sum-0.7.1.0` constraint on `some` has been updated.
36-
# See https://github.com/haskell/haskell-language-server/issues/2969
37-
# and https://github.com/obsidiansystems/dependent-sum/issues/71
38-
haskell-language-server = {
39-
cabalProject = ''
40-
packages: .
41-
constraints: dependent-sum >=0.7.1.0
42-
'';
43-
};
44-
4554
lsp-test = {
4655
cabalProject = ''
4756
packages: .
@@ -76,13 +85,4 @@ in [(
7685
})];
7786
};
7887

79-
ormolu = {
80-
modules = [
81-
({ lib, ... }: {
82-
options.nonReinstallablePkgs =
83-
lib.mkOption { apply = lib.remove "Cabal"; };
84-
})
85-
];
86-
};
87-
8888
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/compiler/cbits/genSym.c b/compiler/cbits/genSym.c
2+
index 0897547..8627f5a 100644
3+
--- a/compiler/cbits/genSym.c
4+
+++ b/compiler/cbits/genSym.c
5+
@@ -9,7 +9,7 @@
6+
//
7+
// The CPP is thus about the RTS version GHC is linked against, and not the
8+
// version of the GHC being built.
9+
-#if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0)
10+
+#if !MIN_VERSION_GLASGOW_HASKELL(9,2,0,0)
11+
HsInt ghc_unique_counter = 0;
12+
HsInt ghc_unique_inc = 1;
13+
#endif

release.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ let
2121
# added here will also included without aggregation, making it easier
2222
# to find a failing test. Keep in mind though that adding too many
2323
# of these will slow down eval times.
24-
x86_64-linux = allJobs.R2111.ghc8107.x86_64-linux.native or {};
25-
x86_64-darwin = allJobs.R2111.ghc8107.x86_64-darwin.native or {};
24+
x86_64-linux = allJobs.unstable.ghc8107.x86_64-linux.native or {};
25+
x86_64-darwin = allJobs.unstable.ghc8107.x86_64-darwin.native or {};
2626
};
2727
names = x: lib.filter (n: n != "recurseForDerivations" && n != "meta")
2828
(builtins.attrNames x);

test/cabal-simple/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ in recurseIntoAttrs {
3030
};
3131

3232
# Used for testing externally with nix-shell (../tests.sh).
33-
test-shell = project.shellFor { tools = { cabal = "3.6.2.0"; }; withHoogle = !__elem compiler-nix-name ["ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924"]; };
33+
test-shell = project.shellFor { tools = { cabal = "latest"; }; withHoogle = !__elem compiler-nix-name ["ghc901" "ghc902" "ghc921" "ghc922" "ghc923" "ghc924"]; };
3434

3535
run = stdenv.mkDerivation {
3636
name = "cabal-simple-test";

test/haskell-language-server/cabal.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ in recurseIntoAttrs {
77
};
88
build = project.getComponent "haskell-language-server:exe:haskell-language-server";
99

10-
# Haskell Language Server in hackage does not build for GHC 9.2 yet
11-
meta.disabled = __elem compiler-nix-name ["ghc921" "ghc922" "ghc923" "ghc924"] || stdenv.hostPlatform != stdenv.buildPlatform;
10+
# hls does not need to be cross compiled.
11+
meta.disabled = stdenv.hostPlatform != stdenv.buildPlatform;
1212
}

test/shell-for/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let
2323
packages = ps: with ps; [ pkga pkgb ];
2424
# This adds cabal-install to the shell, which helps tests because
2525
# they use a nix-shell --pure. Normally you would BYO cabal-install.
26-
tools = { cabal = "3.2.0.0"; };
26+
tools = { cabal = "latest"; };
2727
exactDeps = true;
2828
# Avoid duplicate package issues when runghc looks for packages
2929
packageSetupDeps = false;
@@ -34,7 +34,7 @@ let
3434
packages = ps: with ps; [ pkga ];
3535
# This adds cabal-install to the shell, which helps tests because
3636
# they use a nix-shell --pure. Normally you would BYO cabal-install.
37-
tools = { cabal = "3.2.0.0"; };
37+
tools = { cabal = "latest"; };
3838
exactDeps = true;
3939
# Avoid duplicate package issues when runghc looks for packages
4040
packageSetupDeps = false;
@@ -46,7 +46,7 @@ let
4646
# packages = ps: with ps; [ pkga pkgb ];
4747
# This adds cabal-install to the shell, which helps tests because
4848
# they use a nix-shell --pure. Normally you would BYO cabal-install.
49-
tools = { cabal = "3.2.0.0"; };
49+
tools = { cabal = "latest"; };
5050
# Avoid duplicate package issues when runghc looks for packages
5151
packageSetupDeps = false;
5252
};

0 commit comments

Comments
 (0)