Merge pull request #100716 from NixOS/haskell-updates
Update Haskell package set to LTS 16.18 (plus other fixes)
This commit is contained in:
commit
50e986ba96
|
@ -359,6 +359,39 @@ services.hoogle = {
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### How to install haskell-language-server
|
||||||
|
|
||||||
|
In short: Install `pkgs.haskell-language-server` and use the
|
||||||
|
`haskell-language-server-wrapper` command to run it. See the [hls
|
||||||
|
README](https://github.com/haskell/haskell-language-server) on how to configure
|
||||||
|
your text editor to use hls and how to test your setup.
|
||||||
|
|
||||||
|
Hls needs to be compiled with the ghc version of the project you use it on.
|
||||||
|
|
||||||
|
`pkgs.haskell-language-server` provides `haskell-language-server-wrapper`,
|
||||||
|
`haskell-language-server`, `haskell-language-server-x.x` and
|
||||||
|
`haskell-language-server-x.x.x` binaries, where `x.x.x` is the ghc version for
|
||||||
|
which it is compiled. By default it includes binaries for all ghc versions
|
||||||
|
that are provided in the binary caches. You can override that list with e.g.
|
||||||
|
|
||||||
|
```nix
|
||||||
|
pkgs.haskell-language-server.override { supportedGhcVersions = [ "884" "901" ]; }
|
||||||
|
```
|
||||||
|
|
||||||
|
When you run `haskell-language-server-wrapper` it will detect the ghc version
|
||||||
|
used by the project you are working on (by asking e.g. cabal or stack) and pick
|
||||||
|
the appropriate above mentioned binary from your path.
|
||||||
|
|
||||||
|
Be careful when installing hls globally and using a pinned nixpkgs for a Haskell
|
||||||
|
project in a nix-shell. If the nixpkgs versions deviate to much (e.g. use
|
||||||
|
different `glibc` versions) hls might fail. It is recommended to then install hls
|
||||||
|
in the nix-shell from the nixpkgs version pinned in there.
|
||||||
|
|
||||||
|
If you know, that you only use one ghc version, e.g. in a project specific
|
||||||
|
nix-shell You can either use an override as given above or simply install
|
||||||
|
`pkgs.haskellPackages.haskell-language-server` instead of the top-level
|
||||||
|
attribute `pkgs.haskell-language-server`.
|
||||||
|
|
||||||
### How to build a Haskell project using Stack
|
### How to build a Haskell project using Stack
|
||||||
|
|
||||||
[Stack](http://haskellstack.org) is a popular build tool for Haskell projects.
|
[Stack](http://haskellstack.org) is a popular build tool for Haskell projects.
|
||||||
|
|
|
@ -77,6 +77,15 @@ self: super: {
|
||||||
hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;
|
hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Backport fix for bash: compgen: command not found
|
||||||
|
# which happens in nix-shell when a non-interactive bash is on PATH
|
||||||
|
# PR to master: https://github.com/pcapriotti/optparse-applicative/pull/408
|
||||||
|
optparse-applicative = appendPatch super.optparse-applicative (pkgs.fetchpatch {
|
||||||
|
name = "optparse-applicative-0.15.1-hercules-ci-compgen.diff";
|
||||||
|
url = "https://github.com/hercules-ci/optparse-applicative/compare/0.15.1...hercules-ci:0.15.1-nixpkgs-compgen.diff";
|
||||||
|
sha256 = "1bcp6b7gvc8pqbn1n1ybhizkkl5if7hk9ipgl746vk08v0d3xxql";
|
||||||
|
});
|
||||||
|
|
||||||
# Fix test trying to access /home directory
|
# Fix test trying to access /home directory
|
||||||
shell-conduit = overrideCabal super.shell-conduit (drv: {
|
shell-conduit = overrideCabal super.shell-conduit (drv: {
|
||||||
postPatch = "sed -i s/home/tmp/ test/Spec.hs";
|
postPatch = "sed -i s/home/tmp/ test/Spec.hs";
|
||||||
|
@ -137,6 +146,14 @@ self: super: {
|
||||||
then addBuildDepend super.halive pkgs.darwin.apple_sdk.frameworks.AppKit
|
then addBuildDepend super.halive pkgs.darwin.apple_sdk.frameworks.AppKit
|
||||||
else super.halive;
|
else super.halive;
|
||||||
|
|
||||||
|
# Test suite fails due golden tests checking text representation
|
||||||
|
# of normalized dhall expressions, and newer dhall versions format
|
||||||
|
# differently.
|
||||||
|
hpack-dhall =
|
||||||
|
if pkgs.lib.versionOlder "0.5.2" super.hpack-dhall.version
|
||||||
|
then throw "Drop dontCheck override for hpack-dhall > 0.5.2"
|
||||||
|
else dontCheck super.hpack-dhall;
|
||||||
|
|
||||||
barbly = addBuildDepend super.barbly pkgs.darwin.apple_sdk.frameworks.AppKit;
|
barbly = addBuildDepend super.barbly pkgs.darwin.apple_sdk.frameworks.AppKit;
|
||||||
|
|
||||||
# Hakyll's tests are broken on Darwin (3 failures); and they require util-linux
|
# Hakyll's tests are broken on Darwin (3 failures); and they require util-linux
|
||||||
|
@ -1376,12 +1393,6 @@ self: super: {
|
||||||
# https://github.com/jgm/commonmark-hs/issues/55
|
# https://github.com/jgm/commonmark-hs/issues/55
|
||||||
commonmark-extensions = dontCheck super.commonmark-extensions;
|
commonmark-extensions = dontCheck super.commonmark-extensions;
|
||||||
|
|
||||||
|
|
||||||
# 2020-10-11: reflex-dom-pandoc and neuron require skylighting >= 9, which we
|
|
||||||
# can‘t support, because there is no pandoc release compatible with this.
|
|
||||||
reflex-dom-pandoc = doJailbreak super.reflex-dom-pandoc;
|
|
||||||
neuron = doJailbreak super.neuron;
|
|
||||||
|
|
||||||
# Testsuite trying to run `which haskeline-examples-Test`
|
# Testsuite trying to run `which haskeline-examples-Test`
|
||||||
haskeline_0_8_1_0 = dontCheck super.haskeline_0_8_1_0;
|
haskeline_0_8_1_0 = dontCheck super.haskeline_0_8_1_0;
|
||||||
|
|
||||||
|
@ -1453,25 +1464,24 @@ self: super: {
|
||||||
cryptonite = doDistribute self.cryptonite_0_27;
|
cryptonite = doDistribute self.cryptonite_0_27;
|
||||||
|
|
||||||
# We want the latest version of Pandoc.
|
# We want the latest version of Pandoc.
|
||||||
|
skylighting = doDistribute super.skylighting_0_10_0_2;
|
||||||
|
skylighting-core = doDistribute super.skylighting-core_0_10_0_2;
|
||||||
hslua = doDistribute self.hslua_1_1_2;
|
hslua = doDistribute self.hslua_1_1_2;
|
||||||
jira-wiki-markup = doDistribute self.jira-wiki-markup_1_3_2;
|
jira-wiki-markup = doDistribute self.jira-wiki-markup_1_3_2;
|
||||||
pandoc = doDistribute self.pandoc_2_10_1;
|
pandoc = doDistribute self.pandoc_2_11_0_2;
|
||||||
pandoc-citeproc = doDistribute self.pandoc-citeproc_0_17_0_2;
|
# jailbreaking pandoc-citeproc because it has not bumped upper bound on pandoc
|
||||||
pandoc-types = doDistribute self.pandoc-types_1_21;
|
pandoc-citeproc = doJailbreak (doDistribute self.pandoc-citeproc_0_17_0_2);
|
||||||
|
pandoc-types = doDistribute self.pandoc-types_1_22;
|
||||||
rfc5051 = doDistribute self.rfc5051_0_2;
|
rfc5051 = doDistribute self.rfc5051_0_2;
|
||||||
|
|
||||||
# Upstream forgot to change the Cabal version bounds in the test suite.
|
|
||||||
# See: https://github.com/jaspervdj/stylish-haskell/pull/297
|
|
||||||
# Will be fixed whenever they next bump the version number
|
|
||||||
stylish-haskell = appendPatch super.stylish-haskell (pkgs.fetchpatch {
|
|
||||||
url = "https://github.com/jaspervdj/stylish-haskell/commit/9550aa1cd177aa6fe271d075177109d66a79e67f.patch";
|
|
||||||
sha256 = "1ffnbd2s4fx0ylnnlcyyag119yxb32p5r20b38l39lsa0jwv229f";
|
|
||||||
});
|
|
||||||
|
|
||||||
# The test suite attempts to read `/etc/resolv.conf`, which doesn't work in the sandbox.
|
# The test suite attempts to read `/etc/resolv.conf`, which doesn't work in the sandbox.
|
||||||
domain-auth = dontCheck super.domain-auth;
|
domain-auth = dontCheck super.domain-auth;
|
||||||
# INSERT NEW OVERRIDES ABOVE THIS LINE
|
# INSERT NEW OVERRIDES ABOVE THIS LINE
|
||||||
|
|
||||||
|
# stack-2.5.1 needs a more current version of pantry to compile
|
||||||
|
pantry = self.pantry_0_5_1_3;
|
||||||
|
|
||||||
|
# haskell-language-server needs a more current version of pantry to compile
|
||||||
} // (let
|
} // (let
|
||||||
inherit (self) hls-ghcide hls-brittany;
|
inherit (self) hls-ghcide hls-brittany;
|
||||||
hlsScopeOverride = self: super: {
|
hlsScopeOverride = self: super: {
|
||||||
|
|
|
@ -129,4 +129,7 @@ self: super: {
|
||||||
executableHaskellDepends = drv.executableToolDepends or [] ++ [ self.repline ];
|
executableHaskellDepends = drv.executableToolDepends or [] ++ [ self.repline ];
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
# Break out of "Cabal < 3.2" constraint.
|
||||||
|
stylish-haskell = doJailbreak super.stylish-haskell;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,10 @@ default-package-overrides:
|
||||||
# gi-gdkx11-4.x requires gtk-4.x, which is still under development and
|
# gi-gdkx11-4.x requires gtk-4.x, which is still under development and
|
||||||
# not yet available in Nixpkgs
|
# not yet available in Nixpkgs
|
||||||
- gi-gdkx11 < 4
|
- gi-gdkx11 < 4
|
||||||
# LTS Haskell 16.17
|
# haskell-language-server 0.5.0.0 doesn't accept newer versions
|
||||||
|
- fourmolu ==0.2.*
|
||||||
|
- refinery ==0.2.*
|
||||||
|
# LTS Haskell 16.18
|
||||||
- abstract-deque ==0.3
|
- abstract-deque ==0.3
|
||||||
- abstract-par ==0.3.3
|
- abstract-par ==0.3.3
|
||||||
- AC-Angle ==1.0
|
- AC-Angle ==1.0
|
||||||
|
@ -378,14 +381,14 @@ default-package-overrides:
|
||||||
- bytestring-mmap ==0.2.2
|
- bytestring-mmap ==0.2.2
|
||||||
- bytestring-strict-builder ==0.4.5.3
|
- bytestring-strict-builder ==0.4.5.3
|
||||||
- bytestring-to-vector ==0.3.0.1
|
- bytestring-to-vector ==0.3.0.1
|
||||||
- bytestring-tree-builder ==0.2.7.4
|
- bytestring-tree-builder ==0.2.7.5
|
||||||
- bz2 ==1.0.0.1
|
- bz2 ==1.0.0.1
|
||||||
- bzlib-conduit ==0.3.0.2
|
- bzlib-conduit ==0.3.0.2
|
||||||
- c2hs ==0.28.6
|
- c2hs ==0.28.6
|
||||||
- cabal-appimage ==0.3.0.0
|
- cabal-appimage ==0.3.0.0
|
||||||
- cabal-debian ==5.0.3
|
- cabal-debian ==5.0.3
|
||||||
- cabal-doctest ==1.0.8
|
- cabal-doctest ==1.0.8
|
||||||
- cabal-rpm ==2.0.6
|
- cabal-rpm ==2.0.7
|
||||||
- cache ==0.1.3.0
|
- cache ==0.1.3.0
|
||||||
- cacophony ==0.10.1
|
- cacophony ==0.10.1
|
||||||
- calendar-recycling ==0.0.0.1
|
- calendar-recycling ==0.0.0.1
|
||||||
|
@ -803,7 +806,7 @@ default-package-overrides:
|
||||||
- flac-picture ==0.1.2
|
- flac-picture ==0.1.2
|
||||||
- flags-applicative ==0.1.0.2
|
- flags-applicative ==0.1.0.2
|
||||||
- flat ==0.4.4
|
- flat ==0.4.4
|
||||||
- flat-mcmc ==1.5.1
|
- flat-mcmc ==1.5.2
|
||||||
- FloatingHex ==0.4
|
- FloatingHex ==0.4
|
||||||
- floatshow ==0.2.4
|
- floatshow ==0.2.4
|
||||||
- flow ==1.0.21
|
- flow ==1.0.21
|
||||||
|
@ -1011,7 +1014,7 @@ default-package-overrides:
|
||||||
- hasql-pool ==0.5.2
|
- hasql-pool ==0.5.2
|
||||||
- hasql-transaction ==1.0.0.1
|
- hasql-transaction ==1.0.0.1
|
||||||
- hasty-hamiltonian ==1.3.3
|
- hasty-hamiltonian ==1.3.3
|
||||||
- HaTeX ==3.22.2.0
|
- HaTeX ==3.22.3.0
|
||||||
- HaXml ==1.25.5
|
- HaXml ==1.25.5
|
||||||
- haxr ==3000.11.4.1
|
- haxr ==3000.11.4.1
|
||||||
- HCodecs ==0.5.2
|
- HCodecs ==0.5.2
|
||||||
|
@ -1092,7 +1095,7 @@ default-package-overrides:
|
||||||
- hslua-module-doclayout ==0.1.0
|
- hslua-module-doclayout ==0.1.0
|
||||||
- hslua-module-system ==0.2.2
|
- hslua-module-system ==0.2.2
|
||||||
- hslua-module-text ==0.2.1
|
- hslua-module-text ==0.2.1
|
||||||
- HsOpenSSL ==0.11.4.19
|
- HsOpenSSL ==0.11.4.20
|
||||||
- hsp ==0.10.0
|
- hsp ==0.10.0
|
||||||
- hspec ==2.7.4
|
- hspec ==2.7.4
|
||||||
- hspec-attoparsec ==0.1.0.2
|
- hspec-attoparsec ==0.1.0.2
|
||||||
|
@ -1138,7 +1141,7 @@ default-package-overrides:
|
||||||
- http-client-tls ==0.3.5.3
|
- http-client-tls ==0.3.5.3
|
||||||
- http-common ==0.8.2.1
|
- http-common ==0.8.2.1
|
||||||
- http-conduit ==2.3.7.3
|
- http-conduit ==2.3.7.3
|
||||||
- http-date ==0.0.9
|
- http-date ==0.0.10
|
||||||
- http-directory ==0.1.8
|
- http-directory ==0.1.8
|
||||||
- http-download ==0.2.0.0
|
- http-download ==0.2.0.0
|
||||||
- httpd-shed ==0.4.1.1
|
- httpd-shed ==0.4.1.1
|
||||||
|
@ -1153,7 +1156,7 @@ default-package-overrides:
|
||||||
- hunit-dejafu ==2.0.0.4
|
- hunit-dejafu ==2.0.0.4
|
||||||
- hvect ==0.4.0.0
|
- hvect ==0.4.0.0
|
||||||
- hvega ==0.9.1.0
|
- hvega ==0.9.1.0
|
||||||
- hw-balancedparens ==0.4.1.0
|
- hw-balancedparens ==0.4.1.1
|
||||||
- hw-bits ==0.7.2.1
|
- hw-bits ==0.7.2.1
|
||||||
- hw-conduit ==0.2.1.0
|
- hw-conduit ==0.2.1.0
|
||||||
- hw-conduit-merges ==0.2.1.0
|
- hw-conduit-merges ==0.2.1.0
|
||||||
|
@ -1244,7 +1247,7 @@ default-package-overrides:
|
||||||
- ipynb ==0.1.0.1
|
- ipynb ==0.1.0.1
|
||||||
- ipython-kernel ==0.10.2.1
|
- ipython-kernel ==0.10.2.1
|
||||||
- irc ==0.6.1.0
|
- irc ==0.6.1.0
|
||||||
- irc-client ==1.1.1.1
|
- irc-client ==1.1.2.0
|
||||||
- irc-conduit ==0.3.0.4
|
- irc-conduit ==0.3.0.4
|
||||||
- irc-ctcp ==0.1.3.0
|
- irc-ctcp ==0.1.3.0
|
||||||
- isbn ==1.0.0.0
|
- isbn ==1.0.0.0
|
||||||
|
@ -1954,7 +1957,6 @@ default-package-overrides:
|
||||||
- serialise ==0.2.3.0
|
- serialise ==0.2.3.0
|
||||||
- servant ==0.16.2
|
- servant ==0.16.2
|
||||||
- servant-auth ==0.3.2.0
|
- servant-auth ==0.3.2.0
|
||||||
- servant-auth-docs ==0.2.10.0
|
|
||||||
- servant-auth-server ==0.4.5.1
|
- servant-auth-server ==0.4.5.1
|
||||||
- servant-auth-swagger ==0.2.10.0
|
- servant-auth-swagger ==0.2.10.0
|
||||||
- servant-blaze ==0.9
|
- servant-blaze ==0.9
|
||||||
|
@ -2010,7 +2012,7 @@ default-package-overrides:
|
||||||
- signal ==0.1.0.4
|
- signal ==0.1.0.4
|
||||||
- silently ==1.2.5.1
|
- silently ==1.2.5.1
|
||||||
- simple-affine-space ==0.1.1
|
- simple-affine-space ==0.1.1
|
||||||
- simple-cabal ==0.1.2
|
- simple-cabal ==0.1.3
|
||||||
- simple-cmd ==0.2.2
|
- simple-cmd ==0.2.2
|
||||||
- simple-cmd-args ==0.1.6
|
- simple-cmd-args ==0.1.6
|
||||||
- simple-log ==0.9.12
|
- simple-log ==0.9.12
|
||||||
|
@ -2162,7 +2164,7 @@ default-package-overrides:
|
||||||
- tasty ==1.2.3
|
- tasty ==1.2.3
|
||||||
- tasty-ant-xml ==1.1.6
|
- tasty-ant-xml ==1.1.6
|
||||||
- tasty-dejafu ==2.0.0.6
|
- tasty-dejafu ==2.0.0.6
|
||||||
- tasty-discover ==4.2.1
|
- tasty-discover ==4.2.2
|
||||||
- tasty-expected-failure ==0.11.1.2
|
- tasty-expected-failure ==0.11.1.2
|
||||||
- tasty-golden ==2.3.3.2
|
- tasty-golden ==2.3.3.2
|
||||||
- tasty-hedgehog ==1.0.0.2
|
- tasty-hedgehog ==1.0.0.2
|
||||||
|
@ -2224,8 +2226,8 @@ default-package-overrides:
|
||||||
- th-desugar ==1.10
|
- th-desugar ==1.10
|
||||||
- th-env ==0.1.0.2
|
- th-env ==0.1.0.2
|
||||||
- these ==1.1.1.1
|
- these ==1.1.1.1
|
||||||
- these-lens ==1.0.0.1
|
- these-lens ==1.0.1.1
|
||||||
- these-optics ==1
|
- these-optics ==1.0.1.1
|
||||||
- th-expand-syns ==0.4.6.0
|
- th-expand-syns ==0.4.6.0
|
||||||
- th-extras ==0.0.0.4
|
- th-extras ==0.0.0.4
|
||||||
- th-lift ==0.8.2
|
- th-lift ==0.8.2
|
||||||
|
@ -2309,7 +2311,7 @@ default-package-overrides:
|
||||||
- type-map ==0.1.6.0
|
- type-map ==0.1.6.0
|
||||||
- type-natural ==0.8.3.1
|
- type-natural ==0.8.3.1
|
||||||
- typenums ==0.1.2.1
|
- typenums ==0.1.2.1
|
||||||
- type-of-html ==1.5.1.0
|
- type-of-html ==1.5.2.0
|
||||||
- type-of-html-static ==0.1.0.2
|
- type-of-html-static ==0.1.0.2
|
||||||
- type-operators ==0.2.0.0
|
- type-operators ==0.2.0.0
|
||||||
- typerep-map ==0.3.3.0
|
- typerep-map ==0.3.3.0
|
||||||
|
@ -3906,6 +3908,7 @@ broken-packages:
|
||||||
- cmv
|
- cmv
|
||||||
- cnc-spec-compiler
|
- cnc-spec-compiler
|
||||||
- co-log
|
- co-log
|
||||||
|
- co-log-polysemy-formatting
|
||||||
- co-log-sys
|
- co-log-sys
|
||||||
- Coadjute
|
- Coadjute
|
||||||
- coalpit
|
- coalpit
|
||||||
|
@ -4235,7 +4238,6 @@ broken-packages:
|
||||||
- curve25519
|
- curve25519
|
||||||
- curves
|
- curves
|
||||||
- custom-prelude
|
- custom-prelude
|
||||||
- cut-the-crap
|
|
||||||
- CV
|
- CV
|
||||||
- cv-combinators
|
- cv-combinators
|
||||||
- cypher
|
- cypher
|
||||||
|
@ -5690,6 +5692,7 @@ broken-packages:
|
||||||
- hakyll-filestore
|
- hakyll-filestore
|
||||||
- hakyll-images
|
- hakyll-images
|
||||||
- hakyll-ogmarkup
|
- hakyll-ogmarkup
|
||||||
|
- hakyll-process
|
||||||
- hakyll-R
|
- hakyll-R
|
||||||
- hakyll-sass
|
- hakyll-sass
|
||||||
- hakyll-series
|
- hakyll-series
|
||||||
|
@ -6358,7 +6361,6 @@ broken-packages:
|
||||||
- hp2any-graph
|
- hp2any-graph
|
||||||
- hp2any-manager
|
- hp2any-manager
|
||||||
- hpack-convert
|
- hpack-convert
|
||||||
- hpack-dhall
|
|
||||||
- hpaco
|
- hpaco
|
||||||
- hpaco-lib
|
- hpaco-lib
|
||||||
- hpage
|
- hpage
|
||||||
|
@ -7498,6 +7500,7 @@ broken-packages:
|
||||||
- lol-typing
|
- lol-typing
|
||||||
- loli
|
- loli
|
||||||
- longboi
|
- longboi
|
||||||
|
- longshot
|
||||||
- lookup-tables
|
- lookup-tables
|
||||||
- loop-effin
|
- loop-effin
|
||||||
- loop-while
|
- loop-while
|
||||||
|
@ -7935,6 +7938,7 @@ broken-packages:
|
||||||
- mu-grpc-server
|
- mu-grpc-server
|
||||||
- mu-kafka
|
- mu-kafka
|
||||||
- mu-protobuf
|
- mu-protobuf
|
||||||
|
- mu-servant-server
|
||||||
- MuCheck
|
- MuCheck
|
||||||
- MuCheck-Hspec
|
- MuCheck-Hspec
|
||||||
- MuCheck-HUnit
|
- MuCheck-HUnit
|
||||||
|
|
|
@ -645,6 +645,7 @@ self: super: builtins.intersectAttrs super {
|
||||||
# Tests require internet
|
# Tests require internet
|
||||||
http-download = dontCheck super.http-download;
|
http-download = dontCheck super.http-download;
|
||||||
pantry = dontCheck super.pantry;
|
pantry = dontCheck super.pantry;
|
||||||
|
pantry_0_5_1_3 = dontCheck super.pantry_0_5_1_3;
|
||||||
|
|
||||||
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
|
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
|
||||||
# need it during the build itself, too.
|
# need it during the build itself, too.
|
||||||
|
@ -731,7 +732,7 @@ self: super: builtins.intersectAttrs super {
|
||||||
primitive = dontCheck super.primitive;
|
primitive = dontCheck super.primitive;
|
||||||
|
|
||||||
cut-the-crap =
|
cut-the-crap =
|
||||||
let path = pkgs.stdenv.lib.makeBinPath [ pkgs.ffmpeg_3 ];
|
let path = pkgs.stdenv.lib.makeBinPath [ pkgs.ffmpeg_3 pkgs.youtube-dl ];
|
||||||
in overrideCabal (addBuildTool super.cut-the-crap pkgs.makeWrapper) (_drv: {
|
in overrideCabal (addBuildTool super.cut-the-crap pkgs.makeWrapper) (_drv: {
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/cut-the-crap \
|
wrapProgram $out/bin/cut-the-crap \
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,58 @@
|
||||||
|
{ lib, supportedGhcVersions ? [ "865" "884" "8102" ], stdenv, haskellPackages
|
||||||
|
, haskell }:
|
||||||
|
#
|
||||||
|
# The recommended way to override this package is
|
||||||
|
#
|
||||||
|
# pkgs.haskell-language-server.override { supportedGhcVersions = [ "901" ]; }
|
||||||
|
#
|
||||||
|
# for example. Read more about this in the haskell-language-server section of the nixpkgs manual.
|
||||||
|
#
|
||||||
|
let
|
||||||
|
inherit (lib) concatStringsSep concatMapStringsSep take splitString;
|
||||||
|
getPackages = version: haskell.packages."ghc${version}";
|
||||||
|
getMajorVersion = packages:
|
||||||
|
concatStringsSep "." (take 2 (splitString "." packages.ghc.version));
|
||||||
|
tunedHls = hsPkgs:
|
||||||
|
haskell.lib.justStaticExecutables
|
||||||
|
(haskell.lib.overrideCabal hsPkgs.haskell-language-server (old: {
|
||||||
|
postInstall = ''
|
||||||
|
remove-references-to -t ${hsPkgs.ghc} $out/bin/haskell-language-server
|
||||||
|
remove-references-to -t ${hsPkgs.shake.data} $out/bin/haskell-language-server
|
||||||
|
remove-references-to -t ${hsPkgs.js-jquery.data} $out/bin/haskell-language-server
|
||||||
|
remove-references-to -t ${hsPkgs.js-dgtable.data} $out/bin/haskell-language-server
|
||||||
|
remove-references-to -t ${hsPkgs.js-flot.data} $out/bin/haskell-language-server
|
||||||
|
'';
|
||||||
|
}));
|
||||||
|
targets = version:
|
||||||
|
let packages = getPackages version;
|
||||||
|
in [
|
||||||
|
"haskell-language-server-${packages.ghc.version}"
|
||||||
|
"haskell-language-server-${getMajorVersion packages}"
|
||||||
|
];
|
||||||
|
makeSymlinks = version:
|
||||||
|
concatMapStringsSep "\n" (x:
|
||||||
|
"ln -s ${
|
||||||
|
tunedHls (getPackages version)
|
||||||
|
}/bin/haskell-language-server $out/bin/${x}") (targets version);
|
||||||
|
pkg = tunedHls haskellPackages;
|
||||||
|
in stdenv.mkDerivation {
|
||||||
|
pname = "haskell-language-server";
|
||||||
|
version = haskellPackages.haskell-language-server.version;
|
||||||
|
buildCommand = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
ln -s ${pkg}/bin/haskell-language-server $out/bin/haskell-language-server
|
||||||
|
ln -s ${pkg}/bin/haskell-language-server-wrapper $out/bin/haskell-language-server-wrapper
|
||||||
|
${concatMapStringsSep "\n" makeSymlinks supportedGhcVersions}
|
||||||
|
'';
|
||||||
|
meta = haskellPackages.haskell-language-server.meta // {
|
||||||
|
maintainers = [ lib.maintainers.maralorn ];
|
||||||
|
longDescription = ''
|
||||||
|
This package provides haskell-language-server, haskell-language-server-wrapper, ${
|
||||||
|
concatMapStringsSep ", " (x: concatStringsSep ", " (targets x))
|
||||||
|
supportedGhcVersions
|
||||||
|
}.
|
||||||
|
|
||||||
|
You can override the list supportedGhcVersions.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -4360,6 +4360,8 @@ in
|
||||||
|
|
||||||
hash-slinger = callPackage ../tools/security/hash-slinger { };
|
hash-slinger = callPackage ../tools/security/hash-slinger { };
|
||||||
|
|
||||||
|
haskell-language-server = callPackage ../development/tools/haskell/haskell-language-server/withWrapper.nix { };
|
||||||
|
|
||||||
hasmail = callPackage ../applications/networking/mailreaders/hasmail { };
|
hasmail = callPackage ../applications/networking/mailreaders/hasmail { };
|
||||||
|
|
||||||
hal-flash = callPackage ../os-specific/linux/hal-flash { };
|
hal-flash = callPackage ../os-specific/linux/hal-flash { };
|
||||||
|
|
Loading…
Reference in New Issue