Skip to content

Commit 71e52c0

Browse files
committed
Merge branch 'master' of github.com:input-output-hk/haskell.nix into circuithub
2 parents fe16101 + 4835f2b commit 71e52c0

File tree

447 files changed

+81467
-212
lines changed

Some content is hidden

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

447 files changed

+81467
-212
lines changed

build.nix

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,18 @@ in rec {
4343
"ghc8107" = "3.4.1";
4444
}.${compiler-nix-name} or "latest";
4545
};
46-
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.4" < 0) {
47-
stack = tool compiler-nix-name "stack" { version = "2.9.3"; inherit evalPackages; };
46+
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.6" < 0) {
47+
stack =
48+
tool compiler-nix-name "stack" {
49+
cabalProjectLocal = ''
50+
constraints: optparse-applicative <0.18
51+
'';
52+
version =
53+
if __compareVersions haskell.compiler.${compiler-nix-name}.version "9.2" < 0
54+
then "2.9.3"
55+
else "2.11.1";
56+
inherit evalPackages;
57+
};
4858
} // pkgs.lib.optionalAttrs (__compareVersions haskell.compiler.${compiler-nix-name}.version "9.6" < 0) {
4959
hls-latest = tool compiler-nix-name "haskell-language-server" {
5060
inherit evalPackages;

ci.nix

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
nixpkgsVersions = {
1515
"R2205" = "nixpkgs-2205";
1616
"R2211" = "nixpkgs-2211";
17+
"R2305" = "nixpkgs-2305";
1718
"unstable" = "nixpkgs-unstable";
1819
};
1920
haskellNix = compat { inherit checkMaterialization system; };
@@ -50,39 +51,45 @@
5051
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2211") {
5152
ghc8107 = false;
5253
ghc902 = false;
53-
ghc927 = false;
54+
ghc928 = false;
5455
ghc945 = false;
56+
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2305") {
57+
ghc8107 = false;
58+
ghc902 = false;
59+
ghc928 = false;
60+
ghc945 = false;
61+
ghc962 = false;
5562
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
5663
ghc884 = false;
5764
ghc8107 = true;
5865
ghc902 = false;
59-
ghc927 = true;
66+
ghc928 = true;
6067
ghc945 = true;
61-
ghc961 = true;
68+
ghc962 = true;
6269
}));
6370
crossSystems = nixpkgsName: nixpkgs: compiler-nix-name:
6471
# We need to use the actual nixpkgs version we're working with here, since the values
6572
# of 'lib.systems.examples' are not understood between all versions
6673
let lib = nixpkgs.lib;
6774
in lib.optionalAttrs (nixpkgsName == "unstable"
68-
&& ((system == "x86_64-linux" && __elem compiler-nix-name ["ghc8107" "ghc961"])
69-
|| (system == "aarch64-linux" && __elem compiler-nix-name ["ghc8107" "ghc961"])
70-
|| (system == "x86_64-darwin" && __elem compiler-nix-name ["ghc8107" "ghc961"])
71-
|| (system == "aarch64-darwin" && __elem compiler-nix-name ["ghc8107" "ghc961"])
75+
&& ((system == "x86_64-linux" && __elem compiler-nix-name ["ghc8107" "ghc962"])
76+
|| (system == "aarch64-linux" && __elem compiler-nix-name ["ghc8107" "ghc962"])
77+
|| (system == "x86_64-darwin" && __elem compiler-nix-name ["ghc8107" "ghc962"])
78+
|| (system == "aarch64-darwin" && __elem compiler-nix-name ["ghc8107" "ghc962"])
7279
)) {
7380
inherit (lib.systems.examples) ghcjs;
7481
} // lib.optionalAttrs (nixpkgsName == "unstable"
75-
&& ((system == "x86_64-linux" && __elem compiler-nix-name ["ghc8107" "ghc902" "ghc926" "ghc927" "ghc945" "ghc961"])
82+
&& ((system == "x86_64-linux" && __elem compiler-nix-name ["ghc8107" "ghc902" "ghc926" "ghc927" "ghc928" "ghc945" "ghc962"])
7683
|| (system == "x86_64-darwin" && __elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
7784
inherit (lib.systems.examples) mingwW64;
78-
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && __elem compiler-nix-name ["ghc8107" "ghc902" "ghc922" "ghc923" "ghc924" "ghc926" "ghc927" "ghc945" "ghc961"]) {
85+
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && __elem compiler-nix-name ["ghc8107" "ghc902" "ghc922" "ghc923" "ghc924" "ghc926" "ghc927" "ghc928" "ghc945" "ghc962"]) {
7986
# Musl cross only works on linux
8087
# aarch64 cross only works on linux
8188
inherit (lib.systems.examples) musl64 aarch64-multiplatform;
82-
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && __elem compiler-nix-name ["ghc927"]) {
89+
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && __elem compiler-nix-name ["ghc927" "ghc928"]) {
8390
# TODO fix this for the compilers we build with hadrian (ghc >=9.4)
8491
inherit (lib.systems.examples) aarch64-multiplatform-musl;
85-
} // lib.optionalAttrs (system == "aarch64-linux" && nixpkgsName == "unstable" && __elem compiler-nix-name ["ghc927" "ghc944" "ghc961"]) {
92+
} // lib.optionalAttrs (system == "aarch64-linux" && nixpkgsName == "unstable" && __elem compiler-nix-name ["ghc927" "ghc928" "ghc945" "ghc962"]) {
8693
inherit (lib.systems.examples) aarch64-multiplatform-musl;
8794
};
8895
isDisabled = d: d.meta.disabled or false;

compiler/ghc/default.nix

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ let
242242
then ../../materialized/ghc8107/hadrian-ghc94
243243
else ../../materialized/ghc8107/hadrian-ghc96;
244244
modules = [{
245-
# Apply the patches in a way that does not require using somethin
245+
# Apply the patches in a way that does not require using something
246246
# like `srcOnly`. The problem with `pkgs.srcOnly` was that it had to run
247247
# on a platform at eval time.
248248
packages.hadrian.prePatch = ''
@@ -260,7 +260,13 @@ let
260260
cabalProjectLocal = null;
261261
cabalProjectFreeze = null;
262262
src = haskell-nix.haskellLib.cleanSourceWith {
263-
inherit src;
263+
src = {
264+
outPath = buildPackages.srcOnly {
265+
name = "hadrian";
266+
inherit src;
267+
};
268+
filterPath = { path, ... }: path;
269+
};
264270
subDir = "hadrian";
265271
};
266272
};
@@ -274,7 +280,8 @@ let
274280
+ lib.optionalString (!enableShared) "+no_dynamic_ghc"
275281
+ lib.optionalString useLLVM "+llvm"
276282
+ lib.optionalString enableDWARF "+debug_info"
277-
+ lib.optionalString targetPlatform.isGhcjs "+native_bignum+no_profiled_libs"
283+
+ lib.optionalString (enableNativeBignum || targetPlatform.isGhcjs) "+native_bignum"
284+
+ lib.optionalString targetPlatform.isGhcjs "+no_profiled_libs"
278285
} --docs=no-sphinx -j --verbose"
279286
# This is needed to prevent $GCC from emitting out of line atomics.
280287
# Those would then result in __aarch64_ldadd1_sync and others being referenced, which
@@ -317,7 +324,7 @@ let
317324
# Same goes for strip.
318325
strip =
319326
# TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
320-
if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
327+
if stdenv.targetPlatform.isAarch64
321328
then targetCC.bintools
322329
else targetCC.bintools.bintools;
323330
};

docs/tutorials/development/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ in pkgs.haskell-nix.project {
2626
src = ./.;
2727
};
2828
# Specify the GHC version to use.
29-
compiler-nix-name = "ghc927"; # Not required for `stack.yaml` based projects.
29+
compiler-nix-name = "ghc92"; # Not required for `stack.yaml` based projects.
3030
}

docs/tutorials/getting-started-flakes/flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
helloProject =
1313
final.haskell-nix.project' {
1414
src = ./.;
15-
compiler-nix-name = "ghc927";
15+
compiler-nix-name = "ghc92";
1616
# This is used by `nix develop .` to open a shell for use with
1717
# `cabal`, `hlint` and `haskell-language-server`
1818
shell.tools = {

docs/tutorials/getting-started/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ in pkgs.haskell-nix.project {
2626
src = ./.;
2727
};
2828
# Specify the GHC version to use.
29-
compiler-nix-name = "ghc927"; # Not required for `stack.yaml` based projects.
29+
compiler-nix-name = "ghc92"; # Not required for `stack.yaml` based projects.
3030
}

flake.lock

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

flake.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
nixpkgs-2111 = { url = "github:NixOS/nixpkgs/nixpkgs-21.11-darwin"; };
99
nixpkgs-2205 = { url = "github:NixOS/nixpkgs/nixpkgs-22.05-darwin"; };
1010
nixpkgs-2211 = { url = "github:NixOS/nixpkgs/nixpkgs-22.11-darwin"; };
11+
nixpkgs-2305 = { url = "github:NixOS/nixpkgs/nixpkgs-23.05-darwin"; };
1112
nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
1213
flake-compat = { url = "github:input-output-hk/flake-compat/hkm/gitlab-fix"; flake = false; };
1314
flake-utils = { url = "github:hamishmack/flake-utils/hkm/nested-hydraJobs"; };
@@ -64,8 +65,8 @@
6465
};
6566
};
6667

67-
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-2105, nixpkgs-2111, nixpkgs-2205, nixpkgs-2211, flake-utils, ... }@inputs:
68-
let compiler = "ghc927";
68+
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-2105, nixpkgs-2111, nixpkgs-2205, nixpkgs-2211, nixpkgs-2305, flake-utils, ... }@inputs:
69+
let compiler = "ghc928";
6970
config = import ./config.nix;
7071

7172
traceNames = prefix: builtins.mapAttrs (n: v:
@@ -124,6 +125,8 @@
124125
(nixpkgsArgs // { localSystem = { inherit system; }; });
125126
pkgs-2211 = import nixpkgs-2211
126127
(nixpkgsArgs // { localSystem = { inherit system; }; });
128+
pkgs-2305 = import nixpkgs-2305
129+
(nixpkgsArgs // { localSystem = { inherit system; }; });
127130
pkgs-unstable = import nixpkgs-unstable
128131
(nixpkgsArgs // { localSystem = { inherit system; }; });
129132
hix = import ./hix/default.nix { inherit pkgs; };

hix/init/nix/hix.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{pkgs, ...}: {
22
# name = "project-name";
3-
compiler-nix-name = "ghc8107"; # Version of GHC to use
3+
compiler-nix-name = "ghc92"; # Version of GHC to use
44

55
# Cross compilation support:
66
# crossPlatforms = p: pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 ([

lib/cabal-project-parser.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ let
8484
url = repo.location;
8585
"${refOrRev}" = repo.tag;
8686
sha256 = repo."--sha256" or (
87-
if sha256map != null
88-
then sha256map."${repo.location}"."${repo.tag}"
87+
if sha256map != null && sha256map ? ${repo.location}
88+
then sha256map.${repo.location}.${repo.tag}
8989
else null);
9090
subdirs = if repo ? subdir
9191
then pkgs.lib.filter (x: x != "") (pkgs.lib.splitString " " repo.subdir)
@@ -136,7 +136,7 @@ let
136136
attrs = parseBlockLines x.fst;
137137
sha256 = attrs."--sha256" or (
138138
if sha256map != null
139-
then sha256map."${attrs.url}"
139+
then sha256map.${attrs.url} or null
140140
else null);
141141
in rec {
142142
# This is `some-name` from the `repository some-name` line in the `cabal.project` file.

0 commit comments

Comments
 (0)