From 464c4992d210ee488be673fbe41fda9acd7ad2a5 Mon Sep 17 00:00:00 2001
From: Malte Brandy <malte.brandy@maralorn.de>
Date: Tue, 11 May 2021 16:26:00 +0200
Subject: [PATCH] haskellPackages.ghcide: Pin version to fix hls build

---
 .../configuration-hackage2nix/main.yaml       |  1 +
 .../haskell-modules/hackage-packages.nix      | 67 +++++++++++++++++++
 2 files changed, 68 insertions(+)

diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
index cbfc20713755..bb4cc3cffa25 100644
--- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
+++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
@@ -81,6 +81,7 @@ default-package-overrides:
   # e. g. https://github.com/diagrams/diagrams-core/issues/115
   # We can keep this pin presumably until base 4.15
   - monoid-extras < 0.6
+  - ghcide == 1.2.*                     # 2021-05-11: Pin ghcide for hls 1.1.0
 
 extra-packages:
   - base16-bytestring < 1               # required for cabal-install etc.
diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix
index 8455e8b9bf66..27a26e1aa2ec 100644
--- a/pkgs/development/haskell-modules/hackage-packages.nix
+++ b/pkgs/development/haskell-modules/hackage-packages.nix
@@ -101612,6 +101612,72 @@ self: {
      }) {};
 
   "ghcide" = callPackage
+    ({ mkDerivation, aeson, aeson-pretty, array, async, base
+     , base16-bytestring, binary, bytestring, bytestring-encoding
+     , case-insensitive, containers, cryptohash-sha1, data-default
+     , deepseq, dependent-map, dependent-sum, Diff, directory, dlist
+     , extra, filepath, fingertree, fuzzy, ghc, ghc-boot, ghc-boot-th
+     , ghc-check, ghc-exactprint, ghc-paths, ghc-trace-events
+     , ghc-typelits-knownnat, gitrev, Glob, haddock-library, hashable
+     , heapsize, hie-bios, hie-compat, hiedb, hls-plugin-api, hp2pretty
+     , hslogger, implicit-hie, implicit-hie-cradle, lens, lsp, lsp-test
+     , lsp-types, mtl, network-uri, opentelemetry, optparse-applicative
+     , parallel, prettyprinter, prettyprinter-ansi-terminal, process
+     , QuickCheck, quickcheck-instances, record-dot-preprocessor
+     , record-hasfield, regex-tdfa, retrie, rope-utf16-splay, safe
+     , safe-exceptions, shake, shake-bench, sorted-list, sqlite-simple
+     , stm, syb, tasty, tasty-expected-failure, tasty-hunit
+     , tasty-quickcheck, tasty-rerun, text, time, transformers, unix
+     , unliftio, unliftio-core, unordered-containers, utf8-string
+     , vector, yaml
+     }:
+     mkDerivation {
+       pname = "ghcide";
+       version = "1.2.0.2";
+       sha256 = "0r3n23i4b51bb92q6pch9knj079a26jbz0q70qfpv66154d00wld";
+       isLibrary = true;
+       isExecutable = true;
+       libraryHaskellDepends = [
+         aeson array async base base16-bytestring binary bytestring
+         bytestring-encoding case-insensitive containers cryptohash-sha1
+         data-default deepseq dependent-map dependent-sum Diff directory
+         dlist extra filepath fingertree fuzzy ghc ghc-boot ghc-boot-th
+         ghc-check ghc-exactprint ghc-paths ghc-trace-events Glob
+         haddock-library hashable heapsize hie-bios hie-compat hiedb
+         hls-plugin-api hslogger implicit-hie-cradle lens lsp lsp-types mtl
+         network-uri opentelemetry optparse-applicative parallel
+         prettyprinter prettyprinter-ansi-terminal regex-tdfa retrie
+         rope-utf16-splay safe safe-exceptions shake sorted-list
+         sqlite-simple stm syb text time transformers unix unliftio
+         unliftio-core unordered-containers utf8-string vector
+       ];
+       executableHaskellDepends = [
+         aeson aeson-pretty base bytestring containers data-default
+         directory extra filepath ghc gitrev hashable heapsize hie-bios
+         hiedb hls-plugin-api lens lsp lsp-test lsp-types
+         optparse-applicative process safe-exceptions shake text
+         unordered-containers
+       ];
+       testHaskellDepends = [
+         aeson async base binary bytestring containers data-default
+         directory extra filepath ghc ghc-typelits-knownnat haddock-library
+         hls-plugin-api lens lsp lsp-test lsp-types network-uri
+         optparse-applicative process QuickCheck quickcheck-instances
+         record-dot-preprocessor record-hasfield regex-tdfa rope-utf16-splay
+         safe safe-exceptions shake tasty tasty-expected-failure tasty-hunit
+         tasty-quickcheck tasty-rerun text
+       ];
+       testToolDepends = [ implicit-hie ];
+       benchmarkHaskellDepends = [
+         aeson base directory extra filepath optparse-applicative shake
+         shake-bench text yaml
+       ];
+       benchmarkToolDepends = [ hp2pretty implicit-hie ];
+       description = "The core of an IDE";
+       license = lib.licenses.asl20;
+     }) {};
+
+  "ghcide_1_3_0_0" = callPackage
     ({ mkDerivation, aeson, aeson-pretty, array, async, base
      , base16-bytestring, binary, bytestring, bytestring-encoding
      , case-insensitive, containers, cryptohash-sha1, data-default
@@ -101675,6 +101741,7 @@ self: {
        benchmarkToolDepends = [ hp2pretty implicit-hie ];
        description = "The core of an IDE";
        license = lib.licenses.asl20;
+       hydraPlatforms = lib.platforms.none;
      }) {};
 
   "ghcjs-ajax" = callPackage