From b56049c449db89b94c7c79f07646cfb9f3106936 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 5 Dec 2021 13:32:30 +0100 Subject: [PATCH] haskellPackages.brittany: pin to 0.13.1.2 0.14.0.0 introduces support for GHC 9.0.1, but also drops support for all GHCs below, so we can't upgrade to that version. For the 9.0.1 hls brittany support is now possible in theory. In practice however, it is a massive pain to get to work, as britanny depends on the latest and greatest version of multiple packages that are pinned by Stackage LTS. --- .../configuration-ghc-9.0.x.nix | 2 +- .../configuration-hackage2nix/main.yaml | 2 ++ .../haskell-modules/hackage-packages.nix | 33 +++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix index b6b05de0fefa..8670285918f2 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -170,6 +170,6 @@ self: super: { hls-fourmolu-plugin = null; # No upstream support, needs new fourmolu release hls-stylish-haskell-plugin = null; # No upstream support - hls-brittany-plugin = null; # No upstream support, needs new brittany release + hls-brittany-plugin = null; # Dependencies don't build with 9.0.1 }); } diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 43700e7a7630..8bc39a2564be 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -124,6 +124,8 @@ default-package-overrides: # gi-cogl, gi-coglpango, gi-clutter, gi-json, gi-rsvg are only available for haskell-gi >= 0.26 # 1.2.1.0 needs opaleye >= 0.8 which stackage doesn't provide - rel8 < 1.2.1.0 + # 0.14.0.0 drops support for every GHC < 9.0.1 + - brittany < 0.14 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 79c787a0db09..ac5067506ec1 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -46917,6 +46917,38 @@ self: { }) {}; "brittany" = callPackage + ({ mkDerivation, aeson, base, butcher, bytestring, cmdargs + , containers, czipwith, data-tree-print, deepseq, directory, extra + , filepath, ghc, ghc-boot-th, ghc-exactprint, ghc-paths, hspec + , monad-memo, mtl, multistate, parsec, pretty, random, safe + , semigroups, strict, syb, text, transformers, uniplate, unsafe + , yaml + }: + mkDerivation { + pname = "brittany"; + version = "0.13.1.2"; + sha256 = "1pa8qgsild3zl56sdmbsllka64k05jk2p16ij3bdla4rbfw96z5g"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson base butcher bytestring cmdargs containers czipwith + data-tree-print deepseq directory extra filepath ghc ghc-boot-th + ghc-exactprint ghc-paths monad-memo mtl multistate pretty random + safe semigroups strict syb text transformers uniplate unsafe yaml + ]; + executableHaskellDepends = [ base ]; + testHaskellDepends = [ + aeson base butcher bytestring cmdargs containers czipwith + data-tree-print deepseq directory extra filepath ghc ghc-boot-th + ghc-exactprint ghc-paths hspec monad-memo mtl multistate parsec + pretty safe semigroups strict syb text transformers uniplate unsafe + yaml + ]; + description = "Haskell source code formatter"; + license = lib.licenses.agpl3Only; + }) {}; + + "brittany_0_14_0_0" = callPackage ({ mkDerivation, aeson, base, butcher, bytestring, cmdargs , containers, czipwith, data-tree-print, deepseq, directory, extra , filepath, ghc, ghc-boot, ghc-boot-th, ghc-exactprint, hspec @@ -46949,6 +46981,7 @@ self: { ]; description = "Haskell source code formatter"; license = lib.licenses.agpl3Only; + hydraPlatforms = lib.platforms.none; }) {}; "broadcast-chan" = callPackage