haskell-language-server/configuration-ghc-90.nix
cydparser 65f0d057d2
Update flake to GHC 9.2.6 and 9.4.4 (#3503)
* configuration-ghc-94.nix: Don't yolo anymore since packages work now

* Stop doing an extremely slow fetch of all-cabal-hashes

* Export an overlay that does not override the package set

* At least it works in nix on 9.4

* Allow ormolu-0.5.3

* Update flake to GHC 9.2.6 and 9.4.4

---------

Co-authored-by: Jade Lovelace <software@lfcode.ca>
2023-02-24 09:35:35 +00:00

52 lines
1.6 KiB
Nix

{ pkgs, inputs }:
let
disabledPlugins = [ "hls-stylish-haskell-plugin" ];
hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
{
hlsDisabledPlugins = disabledPlugins;
# YOLO
mkDerivation = args:
hsuper.mkDerivation (args // {
jailbreak = true;
doCheck = false;
});
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
# ptr-poker breaks on MacOS without SSE2 optimizations
# https://github.com/nikita-volkov/ptr-poker/issues/11
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
Cabal = hself.Cabal_3_6_3_0;
Cabal-syntax = hself.Cabal-syntax_3_8_1_0;
ghc-lib-parser = hself.callCabal2nix "ghc-lib-parser" inputs.ghc-lib-parser-94 {};
hlint = appendConfigureFlag (hself.callCabal2nix "hlint" inputs.hlint-35 {}) "-fghc-lib";
hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin"
./plugins/hls-hlint-plugin
(pkgs.lib.concatStringsSep " " [ "-fhlint34" "-fghc-lib" ]) { };
OneTuple = overrideCabal hsuper.OneTuple (drv: {
libraryHaskellDepends = drv.libraryHaskellDepends or [] ++ [
hself.base-orphans
];
});
ormolu = hself.callCabal2nix "ormolu" inputs.ormolu-052 {};
# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [ "-f-stylishhaskell" ])
{ };
});
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}