Skip to content

Commit c79eecf

Browse files
yvan-srakaangerman
andauthored
Fix #132: add support for GHC 9.6.4 (#134)
* Fix #132: add support for GHC 9.6.4 `nix flake lock --update-input haskellNix` * Drop ghc99 * Set hlint for 9.2.8 to 3.6.1 * Bump max compiler. Maybe we want to this actually be "unreleased"? * disable hls for 9.7+ We need to find a hls (and have it in haskell.nix) that builds with 9.8 🤦 * Try to fix tools * 9.0 use lhs 2.4 * Split out IOGFull into static as well. * cleanup R * fix typo * R doesn't build for aarch64-musl * Disable R on aarch64; disable hls on -js and -windows * Disable R (libjpeg-turbo fails to build for x86_64-musl) --------- Co-authored-by: Moritz Angermann <[email protected]>
1 parent 82eb2a0 commit c79eecf

File tree

8 files changed

+141
-78
lines changed

8 files changed

+141
-78
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ jobs:
3939
- ghc92
4040
- ghc96
4141
- ghc98
42-
- ghc99
4342
target-platform:
4443
- ""
4544
- "-static"

cross-js.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,16 @@ pkgs.mkShell ({
8787
stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [
8888
])
8989
++ pkgs.lib.optional (withHLS && (compiler-not-in (
90-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.9" >= 0) compiler-nix-name
90+
# it appears we can't get HLS build with 9.8 yet.
91+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
9192
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
9293
++ pkgs.lib.optional (withHlint && (compiler-not-in (
9394
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name
9495
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
9596
++ pkgs.lib.optional withIOG
9697
(with pkgs; [ cddl cbor-diag ]
9798
++ map pkgs.lib.getDev (with pkgs; [
98-
libblst libsodium-vrf secp256k1 #R_4_1_3
99+
libblst libsodium-vrf secp256k1
99100
]))
100101
;
101102
})

cross-windows.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,16 @@ pkgs.pkgsBuildBuild.mkShell ({
174174
windows.mingw_w64_pthreads
175175
])
176176
++ pkgs.lib.optional (withHLS && (compiler-not-in (
177-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.9" >= 0) compiler-nix-name
177+
# it appears we can't get HLS build with 9.8 yet.
178+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
178179
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
179180
++ pkgs.lib.optional (withHlint && (compiler-not-in (
180181
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name
181182
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
182183
++ pkgs.lib.optional withIOG
183184
(with pkgs.pkgsBuildBuild; [ cddl cbor-diag ]
184185
++ map pkgs.lib.getDev (with pkgs; [
185-
libblst libsodium-vrf secp256k1 #R_4_1_3
186+
libblst libsodium-vrf secp256k1
186187
]))
187188
;
188189
})

dynamic.nix

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,23 @@ pkgs.mkShell {
9595
++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isLinux systemd
9696
)
9797
++ pkgs.lib.optional (withHLS && (compiler-not-in (
98-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.9" >= 0) compiler-nix-name
98+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.7" >= 0) compiler-nix-name
9999
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
100100
++ pkgs.lib.optional (withHlint && (compiler-not-in (
101-
pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name
101+
pkgs.lib.optional (builtins.compareVersions compiler.version "9.10" >= 0) compiler-nix-name
102102
++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
103103
++ pkgs.lib.optional withIOG
104104
(with pkgs; [
105105
cddl
106106
cbor-diag
107-
#R_4_1_3 # for plutus
108-
#postgresql # for db-sync
109107
gh
110108
jq
111109
yq-go
112110
]
113-
++ map pkgs.lib.getDev (with pkgs; [ libblst libsodium-vrf secp256k1 icu ] ++ pkgs.lib.optional (withIOGFull) [ R_4_1_3 postgresql ]))
111+
++ map pkgs.lib.getDev (with pkgs; [ libblst libsodium-vrf secp256k1 icu ]
112+
++ pkgs.lib.optional (withIOGFull) [
113+
(if pkgs.stdenv.hostPlatform.isAarch64 then null else R) # for plutus; R is broken on aarch64
114+
postgresql # for db-sync
115+
]))
114116
;
115117
}

flake.lock

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

flake.nix

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,8 @@
3232
'';
3333
postFixup = "";
3434
});
35-
});
36-
# the haskell inline-r package depends on internals of the R
37-
# project that have been hidden in R 4.2+. See
38-
# https://github.com/tweag/HaskellR/issues/374
39-
oldR = (final: prev: {
40-
R_4_1_3 = final.R.overrideDerivation (old: rec {
41-
version = "4.1.3";
42-
patches = []; # upstream patches will most likely break this build, as they are specific to a different version.
43-
src = final.fetchurl {
44-
url = "https://cran.r-project.org/src/base/R-${final.lib.versions.major version}/${old.pname}-${version}.tar.gz";
45-
sha256 = "sha256-Ff9bMzxhCUBgsqUunB2OxVzELdAp45yiKr2qkJUm/tY="; };
46-
});
4735
});
36+
4837
cddl-tools = (final: prev: {
4938
cbor-diag = final.callPackage ./pkgs/cbor-diag { };
5039
cddl = final.callPackage ./pkgs/cddl { };
@@ -86,8 +75,7 @@
8675
"ghc92"
8776
"ghc94"
8877
"ghc96"
89-
"ghc98"
90-
"ghc99"] (short-name: rec {
78+
"ghc98"] (short-name: rec {
9179
inherit pkgs self toolsModule;
9280
compiler-nix-name = pkgs.haskell-nix.resolve-compiler-name short-name;
9381
compiler = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name};
@@ -154,10 +142,18 @@
154142
pkgs.lib.nameValuePair "${short-name}-static-iog" (
155143
import ./static.nix (args // { withIOG = true; })
156144
)) (compilers static-pkgs)
145+
// pkgs.lib.mapAttrs' (short-name: args:
146+
pkgs.lib.nameValuePair "${short-name}-static-iog-full" (
147+
import ./static.nix (args // { withIOG = true; withIOGFull = true;})
148+
)) (compilers static-pkgs)
157149
// pkgs.lib.mapAttrs' (short-name: args:
158150
pkgs.lib.nameValuePair "${short-name}-static-minimal-iog" (
159151
import ./static.nix (args // { withHLS = false; withHlint = false; withIOG = true; })
160152
)) (compilers static-pkgs)
153+
// pkgs.lib.mapAttrs' (short-name: args:
154+
pkgs.lib.nameValuePair "${short-name}-static-minimal-iog-full" (
155+
import ./static.nix (args // { withHLS = false; withHlint = false; withIOG = true; withIOGFull = true; })
156+
)) (compilers static-pkgs)
161157
// pkgs.lib.mapAttrs' (short-name: args:
162158
pkgs.lib.nameValuePair "${short-name}-js-iog" (
163159
import ./cross-js.nix (args // { pkgs = js-pkgs.buildPackages; withIOG = true; })

0 commit comments

Comments
 (0)