From 9a38f36b7e478e6009a885d1407e28feb56fa501 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Wed, 28 Feb 2024 13:56:43 +0800 Subject: [PATCH 1/2] haskellPackages.dhall-lsp-server: use latest revision from git --- .../haskell-modules/configuration-common.nix | 40 ++++++++++++------- .../configuration-hackage2nix/main.yaml | 4 +- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index f37f3e4242288..7ad83affa8a65 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1521,20 +1521,32 @@ self: super: { # upstream: https://github.com/obsidiansystems/which/pull/6 which = doJailbreak super.which; - dhall-lsp-server = - # 2022-09-20: We have overridden lsp to not be the stackage version. - # dhall-lsp-server needs the older 1.4.0.0 lsp - let overridden-dhall-lsp-server = super.dhall-lsp-server.override { - lsp = dontCheck (super.lsp_1_4_0_0.override { - lsp-types = super.lsp-types_1_4_0_1; - }); - }; - in appendPatch (fetchpatch { - # This patch can be removed once the change question is in a tracked release. - url = "https://github.com/dhall-lang/dhall-haskell/pull/2539/commits/5dd0f0ba2d836fea3ef499c7aed04e83269c203f.patch"; - sha256 = "sha256-xjVuLDBptDGfTf7MVmPb0WuuFWRLpgDYX2ybbgjAjzs="; - relative = "dhall-lsp-server"; - }) overridden-dhall-lsp-server; + + # 2024-02-28: The Hackage version dhall-lsp-server-1.1.3 requires + # lsp-1.4.0.0 which is hard to build with this LTS. However, the latest + # git version of dhall-lsp-server works with lsp-2.1.0.0, and only + # needs jailbreaking to build successfully. + dhall-lsp-server = lib.pipe + (super.dhall-lsp-server.overrideScope (lself: lsuper: { + lsp = doJailbreak lself.lsp_2_1_0_0; # sorted-list <0.2.2 + lsp-types = lself.lsp-types_2_0_2_0; + })) + [ + # Use latest main branch version of dhall-lsp-server. + (assert super.dhall-lsp-server.version == "1.1.3"; overrideSrc { + version = "unstable-2024-02-19"; + src = pkgs.fetchFromGitHub { + owner = "dhall-lang"; + repo = "dhall-haskell"; + rev = "277d8b1b3637ba2ce125783cc1936dc9591e67a7"; + hash = "sha256-YvL3XEltU9sdU45ULHeD3j1mPGZoO1J81MW7f2+10ok="; + } + "/dhall-lsp-server"; + }) + # New version needs an extra dependency + (addBuildDepend self.text-rope) + # bounds too strict: mtl <2.3, transformers <0.6 + doJailbreak + ]; # 2022-03-16: lens bound can be loosened https://github.com/ghcjs/jsaddle-dom/issues/19 jsaddle-dom = overrideCabal (old: { diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 79d9798e0f46d..5907ddbb9971a 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -93,8 +93,8 @@ extra-packages: - language-docker == 11.0.0 # required by hadolint 2.12.0, 2022-11-16 - language-javascript == 0.7.0.0 # required by purescript - lens-aeson < 1.2 # 2022-12-17: For aeson < 2.0 compat - - lsp == 1.4.0.0 # 2022-09-18: need for dhall-lsp-server 1.1.2 - - lsp-types == 1.4.0.1 # 2022-09-18: need for dhall-lsp-server 1.1.2 + - lsp == 2.1.0.0 # 2024-02-28: need for dhall-lsp-server unstable + - lsp-types == 2.0.2.0 # 2024-02-28: need for dhall-lsp-server unstable - mmorph == 1.1.3 # Newest working version of mmorph on ghc 8.6.5. needed for hls - network == 2.6.3.1 # required by pkgs/games/hedgewars/default.nix, 2020-11-15 - optparse-applicative < 0.16 # needed for niv-0.2.19 From ef24420fdd80a65e3b5dc964b1601f74f29e2c0c Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Wed, 28 Feb 2024 13:57:17 +0800 Subject: [PATCH 2/2] haskellPackages: regenerate package set based on current config This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh --- .../haskell-modules/hackage-packages.nix | 66 +++++++++++-------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index bde8839508bce..df0f025c48954 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -192783,31 +192783,28 @@ self: { broken = true; }) {}; - "lsp_1_4_0_0" = callPackage + "lsp_2_1_0_0" = callPackage ({ mkDerivation, aeson, async, attoparsec, base, bytestring - , containers, data-default, exceptions, filepath, hashable - , hslogger, hspec, hspec-discover, lens, lsp-types, mtl - , network-uri, QuickCheck, quickcheck-instances, random - , rope-utf16-splay, scientific, sorted-list, stm, text, time - , transformers, unliftio-core, unordered-containers, uuid + , co-log-core, containers, data-default, directory, exceptions + , filepath, hashable, hspec, hspec-discover, lens, lsp-types, mtl + , prettyprinter, random, row-types, sorted-list, stm, temporary + , text, text-rope, transformers, unliftio-core + , unordered-containers, uuid }: mkDerivation { pname = "lsp"; - version = "1.4.0.0"; - sha256 = "18hnb4k3zwjxp3r5jrgrbakvqr2d16azp6jwmfv5lq5n8xn6mwgv"; - revision = "1"; - editedCabalFile = "01a4c4qr2zf0izawrkhbw831hawnl576ckw1an07lxvxdif68py4"; + version = "2.1.0.0"; + sha256 = "03gk98fgf32blywdds0fc5351bmcbbfrnqwlg33l2ih75nwa59y8"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ - aeson async attoparsec base bytestring containers data-default - exceptions hashable hslogger lens lsp-types mtl network-uri random - scientific sorted-list stm text time transformers unliftio-core - unordered-containers uuid + aeson async attoparsec base bytestring co-log-core containers + data-default directory exceptions filepath hashable lens lsp-types + mtl prettyprinter random row-types sorted-list stm temporary text + text-rope transformers unliftio-core unordered-containers uuid ]; testHaskellDepends = [ - aeson base containers filepath hspec lens network-uri QuickCheck - quickcheck-instances rope-utf16-splay sorted-list text + base containers hspec row-types sorted-list text text-rope unordered-containers ]; testToolDepends = [ hspec-discover ]; @@ -192964,28 +192961,41 @@ self: { hydraPlatforms = lib.platforms.none; }) {}; - "lsp-types_1_4_0_1" = callPackage - ({ mkDerivation, aeson, base, binary, bytestring, containers - , data-default, deepseq, Diff, directory, dlist, filepath, hashable - , hslogger, lens, mod, mtl, network-uri, rope-utf16-splay - , scientific, some, template-haskell, temporary, text + "lsp-types_2_0_2_0" = callPackage + ({ mkDerivation, aeson, base, binary, containers, data-default + , deepseq, Diff, directory, dlist, exceptions, file-embed, filepath + , hashable, hspec, hspec-discover, indexed-traversable + , indexed-traversable-instances, lens, lens-aeson, mod, mtl + , network-uri, prettyprinter, QuickCheck, quickcheck-instances + , regex, row-types, safe, some, template-haskell, text , unordered-containers }: mkDerivation { pname = "lsp-types"; - version = "1.4.0.1"; - sha256 = "0dxf5nnaxs2564hgjldkclhm5gvszjxxvz6gk00jmx0gf8k6dm8z"; - revision = "2"; - editedCabalFile = "02vaq4x40l9v67zv3bimxvxa06nwawkcnrjjn6k3k721j15v2li5"; + version = "2.0.2.0"; + sha256 = "0s895x3b8fpcj2b0ia3d4dmwk4vhg6h2anmzffkpr3drsq5bi1j6"; + isLibrary = true; + isExecutable = true; libraryHaskellDepends = [ - aeson base binary bytestring containers data-default deepseq Diff - directory dlist filepath hashable hslogger lens mod mtl network-uri - rope-utf16-splay scientific some template-haskell temporary text + aeson base binary containers data-default deepseq Diff dlist + exceptions file-embed filepath hashable indexed-traversable + indexed-traversable-instances lens lens-aeson mod mtl network-uri + prettyprinter row-types safe some template-haskell text unordered-containers ]; + executableHaskellDepends = [ + base containers directory filepath mtl prettyprinter regex text + ]; + testHaskellDepends = [ + aeson base filepath hspec lens network-uri QuickCheck + quickcheck-instances row-types text + ]; + testToolDepends = [ hspec-discover ]; + doHaddock = false; description = "Haskell library for the Microsoft Language Server Protocol, data types"; license = lib.licenses.mit; hydraPlatforms = lib.platforms.none; + mainProgram = "generator"; }) {}; "lsp-types" = callPackage