diff --git a/cross-js.nix b/cross-js.nix index aa8fb339..318c9b8a 100644 --- a/cross-js.nix +++ b/cross-js.nix @@ -79,8 +79,12 @@ pkgs.mkShell ({ (tool "alex") stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [ ]) - ++ 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 (withHLS && (compiler-not-in ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.9" >= 0) compiler-nix-name + ++ 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 ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name + ++ 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; [ diff --git a/cross-windows.nix b/cross-windows.nix index 9bfc07f3..41acfacb 100644 --- a/cross-windows.nix +++ b/cross-windows.nix @@ -161,8 +161,12 @@ 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 (["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 (withHLS && (compiler-not-in ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.9" >= 0) compiler-nix-name + ++ 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 ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name + ++ 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; [ diff --git a/dynamic.nix b/dynamic.nix index 1c759bfd..c3ea356d 100644 --- a/dynamic.nix +++ b/dynamic.nix @@ -85,8 +85,12 @@ pkgs.mkShell { ] ++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isLinux systemd ) - ++ 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 (withHLS && (compiler-not-in ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.9" >= 0) compiler-nix-name + ++ 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 ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name + ++ pkgs.lib.optional (pkgs.stdenv.hostPlatform.isDarwin && pkgs.stdenv.hostPlatform.isAarch64) "ghc902") "HLint")) (tool "hlint") ++ pkgs.lib.optional withIOG (with pkgs; [ cddl diff --git a/static.nix b/static.nix index 52c1f29c..46467b36 100644 --- a/static.nix +++ b/static.nix @@ -134,8 +134,10 @@ pkgs.mkShell (rec { (pkgs.pkg-config or pkgconfig) stdenv.cc.cc.lib ]) ++ (with pkgs.buildPackages; [ ]) - ++ 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 (withHLS && (compiler-not-in ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.9" >= 0) compiler-nix-name) "Haskell Language Server")) (tool "haskell-language-server") + ++ pkgs.lib.optional (withHlint && (compiler-not-in ( + pkgs.lib.optional (builtins.compareVersions compiler.version "9.8" >= 0) compiler-nix-name) "HLint")) (tool "hlint") ++ pkgs.lib.optional withIOG (with pkgs; [ cddl cbor-diag ]) ; })