From 6237b2185126769cdff5ecc9b037b749509f0885 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 20 Sep 2025 23:51:37 +0200 Subject: [PATCH 1/2] dhall-lsp-server: apply patch for text >= 2.1.2 --- .../haskell-modules/configuration-common.nix | 20 +++++++++++++++---- .../configuration-hackage2nix/broken.yaml | 1 - .../haskell-modules/hackage-packages.nix | 2 -- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 6da545b0bc181..b3e3018381da1 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1768,10 +1768,22 @@ with haskellLib; # Lift bound on lens <5.3 lsp-types_2_1_1_0 = doDistribute (doJailbreak super.lsp-types_2_1_1_0); - # 2025-03-03: dhall-lsp-server-1.1.4 requires lsp-2.1.0.0 - dhall-lsp-server = super.dhall-lsp-server.override { - lsp = self.lsp_2_1_0_0; - }; + dhall-lsp-server = + appendPatches + [ + (pkgs.fetchpatch { + name = "dhall-lsp-server-text-2.1.2.patch"; + url = "https://github.com/dhall-lang/dhall-haskell/commit/9f2d4d44be643229784bfc502ab49184ec82bc05.patch"; + hash = "sha256-cwNH5+7YY8UbA9zHhTRfVaqtIMowZGfFT5Kj+wSlapA="; + relative = "dhall-lsp-server"; + }) + ] + ( + # 2025-03-03: dhall-lsp-server-1.1.4 requires lsp-2.1.0.0 + super.dhall-lsp-server.override { + lsp = self.lsp_2_1_0_0; + } + ); # Tests disabled and broken override needed because of missing lib chrome-test-utils: https://github.com/reflex-frp/reflex-dom/issues/392 reflex-dom-core = lib.pipe super.reflex-dom-core [ diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index eb87a82364bb5..d8ee002062d07 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -1357,7 +1357,6 @@ broken-packages: - dhall-check # failure in job https://hydra.nixos.org/build/233206425 at 2023-09-02 - dhall-csv # failure in job https://hydra.nixos.org/build/233256049 at 2023-09-02 - dhall-fly # failure in job https://hydra.nixos.org/build/233220306 at 2023-09-02 - - dhall-lsp-server # failure in job https://hydra.nixos.org/build/307610458 at 2025-09-19 - dhall-recursive-adt # failure in job https://hydra.nixos.org/build/233210665 at 2023-09-02 - dhall-text # failure in job https://hydra.nixos.org/build/233253809 at 2023-09-02 - dhall-text-shell # failure in job https://hydra.nixos.org/build/244399613 at 2024-01-01 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 6c207cb876cda..170d1fed725d1 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -189315,13 +189315,11 @@ self: { ]; description = "Language Server Protocol (LSP) server for Dhall"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; mainProgram = "dhall-lsp-server"; maintainers = [ lib.maintainers.dalpd lib.maintainers.Gabriella439 ]; - broken = true; } ) { }; From 0742c918f188a21fb05cac8a7cf15e2cc41b1dd3 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 20 Sep 2025 23:58:57 +0200 Subject: [PATCH 2/2] dhall-lsp-server: use lsp from Stackage LTS 24 --- .../haskell-modules/configuration-common.nix | 40 +-- .../configuration-hackage2nix/main.yaml | 3 - .../haskell-modules/hackage-packages.nix | 273 ------------------ 3 files changed, 14 insertions(+), 302 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index b3e3018381da1..e43d3649a823e 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1746,31 +1746,17 @@ with haskellLib; # https://github.com/NixOS/nixpkgs/issues/198495 (dontCheckIf (pkgs.postgresqlTestHook.meta.broken) super.persistent-postgresql); - # Needs matching lsp-types - # Allow lens >= 5.3 - lsp_2_4_0_0 = doDistribute ( - doJailbreak ( - super.lsp_2_4_0_0.override { - lsp-types = self.lsp-types_2_1_1_0; - } - ) - ); - - # Needs matching lsp-types; - # Lift bound on sorted-list <0.2.2 - lsp_2_1_0_0 = doDistribute ( - doJailbreak ( - super.lsp_2_1_0_0.override { - lsp-types = self.lsp-types_2_1_1_0; - } - ) - ); - # Lift bound on lens <5.3 - lsp-types_2_1_1_0 = doDistribute (doJailbreak super.lsp-types_2_1_1_0); - dhall-lsp-server = appendPatches [ + # Add support for lsp >= 2.7 + (pkgs.fetchpatch { + name = "dhall-lsp-server-lsp-2.7.patch"; + url = "https://github.com/dhall-lang/dhall-haskell/commit/a621e1438df5865d966597e2e1b0bb37e8311447.patch"; + sha256 = "sha256-7edxNIeIM/trl2SUXybvSzkscvr1kj5+tZF50IeTOgY="; + relative = "dhall-lsp-server"; + }) + # Fix build with text >= 2.1.2 (pkgs.fetchpatch { name = "dhall-lsp-server-text-2.1.2.patch"; url = "https://github.com/dhall-lang/dhall-haskell/commit/9f2d4d44be643229784bfc502ab49184ec82bc05.patch"; @@ -1779,10 +1765,12 @@ with haskellLib; }) ] ( - # 2025-03-03: dhall-lsp-server-1.1.4 requires lsp-2.1.0.0 - super.dhall-lsp-server.override { - lsp = self.lsp_2_1_0_0; - } + overrideCabal (drv: { + prePatch = '' + ${drv.prePatch or ""} + ${lib.getExe' pkgs.buildPackages.dos2unix "dos2unix"} *.cabal + ''; + }) super.dhall-lsp-server ); # Tests disabled and broken override needed because of missing lib chrome-test-utils: https://github.com/reflex-frp/reflex-dom/issues/392 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 4dfef1e27b2e4..67c23510a7520 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -91,9 +91,6 @@ extra-packages: - hlint == 3.6.* # 2025-04-14: needed for hls with ghc-lib-parser 9.6 - hspec-megaparsec == 2.2.0 # 2023-11-18: Latest version compatible with ghc 9.0 - language-javascript == 0.7.0.0 # required by purescript - - lsp < 2.5 # 2024-07-08: need for koka - - lsp == 2.1.* # 2024-02-28: need for dhall-lsp-server - - lsp-types == 2.1.* # 2024-02-28: need for dhall-lsp-server and koka - network-run == 0.4.0 # 2024-10-20: for GHC 9.10/network == 3.1.* - ormolu == 0.5.2.0 # 2023-08-08: preserve for ghc 9.0 - ormolu == 0.7.2.0 # 2023-11-13: for ghc-lib-parser 9.6 compat diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 170d1fed725d1..d911b57caee72 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -429470,176 +429470,6 @@ self: { } ) { inherit (pkgs) rocksdb; }; - lsp_2_1_0_0 = callPackage ( - { - mkDerivation, - aeson, - async, - attoparsec, - base, - bytestring, - 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 = "2.1.0.0"; - sha256 = "03gk98fgf32blywdds0fc5351bmcbbfrnqwlg33l2ih75nwa59y8"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - 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 = [ - base - containers - hspec - row-types - sorted-list - text - text-rope - unordered-containers - ]; - testToolDepends = [ hspec-discover ]; - description = "Haskell library for the Microsoft Language Server Protocol"; - license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; - } - ) { }; - - lsp_2_4_0_0 = callPackage ( - { - mkDerivation, - aeson, - async, - attoparsec, - base, - bytestring, - co-log-core, - containers, - data-default, - directory, - exceptions, - filepath, - hashable, - hspec, - hspec-discover, - lens, - lens-aeson, - lsp-types, - mtl, - prettyprinter, - random, - row-types, - sorted-list, - stm, - text, - text-rope, - transformers, - unliftio-core, - unordered-containers, - uuid, - }: - mkDerivation { - pname = "lsp"; - version = "2.4.0.0"; - sha256 = "1ggfw2wp9g9fpg9x3kj9zh6l6p2yiw4q0v1gzxjg0mcmvp4aad8w"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - aeson - async - attoparsec - base - bytestring - co-log-core - containers - data-default - directory - exceptions - filepath - hashable - lens - lens-aeson - lsp-types - mtl - prettyprinter - random - row-types - sorted-list - stm - text - text-rope - transformers - unliftio-core - unordered-containers - uuid - ]; - testHaskellDepends = [ - base - containers - hspec - row-types - sorted-list - text - text-rope - unordered-containers - ]; - testToolDepends = [ hspec-discover ]; - description = "Haskell library for the Microsoft Language Server Protocol"; - license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; - } - ) { }; - lsp = callPackage ( { mkDerivation, @@ -429903,109 +429733,6 @@ self: { } ) { }; - lsp-types_2_1_1_0 = callPackage ( - { - mkDerivation, - aeson, - base, - binary, - containers, - data-default, - deepseq, - Diff, - directory, - dlist, - exceptions, - file-embed, - filepath, - generic-arbitrary, - 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, - }: - mkDerivation { - pname = "lsp-types"; - version = "2.1.1.0"; - sha256 = "0gsr0v11xfav7dnq4d433y9ca0snmqaax4pp5sgmf33zl8qhi6s0"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - aeson - base - binary - containers - data-default - deepseq - Diff - dlist - exceptions - file-embed - filepath - generic-arbitrary - hashable - indexed-traversable - indexed-traversable-instances - lens - lens-aeson - mod - mtl - network-uri - prettyprinter - QuickCheck - quickcheck-instances - row-types - safe - some - template-haskell - text - ]; - 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 ( { mkDerivation,