From bdcbbc7bd29cbd7f1ad3abc039e506b3991aaf28 Mon Sep 17 00:00:00 2001 From: maralorn Date: Wed, 21 Sep 2022 05:33:48 +0200 Subject: [PATCH] haskell-language-server: Default toplevel attribute to dynamic linking and one ghc version --- .../manual/from_md/release-notes/rl-2111.section.xml | 10 ++++++++++ nixos/doc/manual/release-notes/rl-2111.section.md | 2 ++ .../haskell/haskell-language-server/withWrapper.nix | 9 ++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index f1c43318347..48431198056 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -1469,6 +1469,16 @@ Superuser created successfully. extent. + + + pkgs.haskell-language-server will now by + default be linked dynamically to improve TemplateHaskell + compatibility. To mitigate the increased closure size it will + now by default only support our current default ghc (at the + moment 9.0.2). Add other ghc versions via e.g. + pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" "92" ]; }. + +
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index 1cf1ad72c07..bc3bd639b1b 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -437,6 +437,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `/usr` will always be included in the initial ramdisk. See the `fileSystems..neededForBoot` option. If any files exist under `/usr` (which is not typical for NixOS), they will be included in the initial ramdisk, increasing its size to a possibly problematic extent. +- `pkgs.haskell-language-server` will now by default be linked dynamically to improve TemplateHaskell compatibility. To mitigate the increased closure size it will now by default only support our current default ghc (at the moment 9.0.2). Add other ghc versions via e.g. `pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" "92" ]; }`. + ## Other Notable Changes {#sec-release-21.11-notable-changes} diff --git a/pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix b/pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix index 616dcabd9cf..e7ba49fa68d 100644 --- a/pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix +++ b/pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix @@ -1,14 +1,14 @@ { lib , stdenv -, supportedGhcVersions ? [ "88" "810" "90" "92" ] -, dynamic ? false +, supportedGhcVersions ? [ "90" ] +, dynamic ? true , haskellPackages , haskell }: # # The recommended way to override this package is # -# pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" ]; } +# pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" "92"]; } # # for example. Read more about this in the haskell-language-server section of the nixpkgs manual. # @@ -57,8 +57,7 @@ in stdenv.mkDerivation { concatMapStringsSep ", " (x: concatStringsSep ", " (targets x)) supportedGhcVersions }. - - You can override the list supportedGhcVersions. + You can choose for which ghc versions to install hls with pkgs.haskell-language-server.override { supportedGhcVersions = [ "90" "92" ]; }. ''; }; }