Skip to content

Commit

Permalink
Fixes for ghc 9.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Oct 16, 2023
1 parent af97a17 commit dfc166b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cross-js.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ pkgs.mkShell ({
(tool "alex")
stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [
])
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc980" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in (["ghc961" "ghc962" "ghc980" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in (["ghc981" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
++ pkgs.lib.optional withIOG
(with pkgs; [ cddl cbor-diag ]
++ map pkgs.lib.getDev (with pkgs; [
Expand Down
4 changes: 2 additions & 2 deletions cross-windows.nix
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ pkgs.pkgsBuildBuild.mkShell ({
(pkgsBuildBuild.haskell-nix.tool compiler-nix-name "happy" "1.20.1.1")
(pkgsBuildBuild.haskell-nix.tool compiler-nix-name "alex" "3.2.7.3")
stdenv.cc.cc.lib ])
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc980" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in (["ghc961" "ghc962" "ghc980" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in (["ghc981" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
++ pkgs.lib.optional withIOG
(with pkgs.pkgsBuildBuild; [ cddl cbor-diag ]
++ map pkgs.lib.getDev (with pkgs; [
Expand Down
4 changes: 2 additions & 2 deletions dynamic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ pkgs.mkShell {
]
++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isLinux systemd
)
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc980" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in (["ghc961" "ghc962" "ghc980" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in (["ghc981" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint")
++ pkgs.lib.optional withIOG
(with pkgs; [
cddl
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"ghc928"
"ghc947"
"ghc962"
"ghc980"
"ghc981"
"ghc99"] (compiler-nix-name:
pkgs.haskell-nix.compiler.${
(pkgs.haskell-nix.cabalProject' { inherit compiler-nix-name; }).args.compiler-nix-name});
Expand Down
4 changes: 2 additions & 2 deletions static.nix
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ pkgs.mkShell (rec {
(pkgs.pkg-config or pkgconfig)
stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [
])
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc980" "ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in ["ghc961" "ghc962" "ghc980" "ghc99" "ghc902"] "HLint")) (tool "hlint")
++ pkgs.lib.optional (withHLS && (compiler-not-in (["ghc99"] ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "Haskell Language Server")) (tool "haskell-language-server")
++ pkgs.lib.optional (withHlint && (compiler-not-in ["ghc981" "ghc99" "ghc902"] "HLint")) (tool "hlint")
++ pkgs.lib.optional withIOG (with pkgs; [ cddl cbor-diag ])
;
})
16 changes: 15 additions & 1 deletion tool-map.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@ compiler-nix-name: tool: {
# HLS release. Therefore we rely on the HLS upstream repository to provide the proper configuration information.
haskell-language-server = {pkgs, ...}: rec {
# Use the github source of HLS that is tested with haskell.nix CI
src = pkgs.haskell-nix.sources."hls-2.0";
src = pkgs.haskell-nix.sources."hls-2.4";
# `tool` normally ignores the `cabal.project` (if there is one in the hackage source).
# We need to use the github one (since it has settings to make hls build).
cabalProject = __readFile (src + "/cabal.project");
cabalProjectLocal = ''
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
key-threshold: 3
root-keys:
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
--sha256: sha256-aVI93DtHziicNn2mGli0YE+bC5BeT7mOQQETp2Thi68=
if impl(ghc < 9.7)
active-repositories: hackage.haskell.org
'';
# sha256 for a `source-repository-package` in the `cabal.project` file.
sha256map."https://github.com/pepeiborra/ekg-json"."7a0af7a8fd38045fd15fb13445bdcc7085325460" = "sha256-fVwKxGgM0S4Kv/4egVAAiAjV7QB5PBqMVMCfsv7otIQ=";
};
Expand Down

0 comments on commit dfc166b

Please sign in to comment.