mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
haskell-language-server: empty list removes all formatters
Based on the discussion in https://github.com/NixOS/nixpkgs/pull/261848
This commit is contained in:
parent
8e803f2fb9
commit
77908eaac0
|
@ -14,8 +14,10 @@
|
|||
# See https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html#static-binaries for more information.
|
||||
, dynamic ? true
|
||||
|
||||
# which formatters are supported. An empty list means “all”.
|
||||
, supportedFormatters ? [ ]
|
||||
# Which formatters are supported. Pass `[]` to remove all formatters.
|
||||
#
|
||||
# Maintainers: if a new formatter is added, add it here and down in knownFormatters
|
||||
, supportedFormatters ? [ "ormolu" "fourmolu" "floskell" "stylish-haskell" ]
|
||||
}:
|
||||
|
||||
# make sure the user only sets GHC versions that actually exist
|
||||
|
@ -126,7 +128,7 @@ let
|
|||
'';
|
||||
}))
|
||||
((if dynamic then enableCabalFlag else disableCabalFlag) "dynamic")
|
||||
(if supportedFormatters != [] then removeUnnecessaryFormatters else lib.id)
|
||||
removeUnnecessaryFormatters
|
||||
]
|
||||
++ lib.optionals (!dynamic) [
|
||||
justStaticExecutables
|
||||
|
|
Loading…
Reference in a new issue