@@ -48,6 +48,7 @@ in { haskell-nix = prev.haskell-nix // {
4848 # Tools better known by their exe name.
4949 toolPackageName = {
5050 cabal = "cabal-install" ;
51+ haskell-language-server-wrapper = "haskell-language-server" ;
5152 } ;
5253
5354 # Packages that are better known by their package name. We are not
@@ -95,82 +96,9 @@ in { haskell-nix = prev.haskell-nix // {
9596 # to the `tools` attribute defined in `build.nix` to make
9697 # sure they are cached.
9798 custom-tools = {
98- ghcide . object-code = args :
99- ( final . haskell-nix . cabalProject ( args // {
100- name = "ghcide" ;
101- src = final . fetchFromGitHub {
102- owner = "mpickering" ;
103- repo = "ghcide" ;
104- rev = "706c59c97c25c66798815c1dc3ee6885a298918a" ;
105- sha256 = "0d158xifwvz0y69ah98ckxakzqpz229mq7rpf2bpbmwhnpw3jmm6" ;
106- } ;
107- modules = [ ( { config , ...} : {
108- packages . ghcide . configureFlags = lib . optional ( ! final . stdenv . targetPlatform . isMusl )
109- "--enable-executable-dynamic" ;
110- nonReinstallablePkgs = [ "Cabal" "array" "base" "binary" "bytestring" "containers" "deepseq"
111- "directory" "filepath" "ghc" "ghc-boot" "ghc-boot-th" "ghc-compact"
112- "ghc-heap" "ghc-prim" "ghci" "haskeline" "hpc" "integer-gmp"
113- "libiserv" "mtl" "parsec" "pretty" "process" "rts" "stm"
114- "template-haskell" "terminfo" "text" "time" "transformers" "unix"
115- "xhtml"
116- ] ;
117- } ) ] ;
118- pkg-def-extras = [
119- ( hackage : {
120- packages = {
121- "alex" = ( ( ( hackage . alex ) . "3.2.5" ) . revisions ) . default ;
122- "happy" = ( ( ( hackage . happy ) . "1.19.12" ) . revisions ) . default ;
123- } ;
124- } )
125- ] ;
126- } ) ) . ghcide . components . exes . ghcide ;
127-
128- haskell-language-server = {
129- "0.5.1" = args :
130- ( final . haskell-nix . cabalProject ( args // {
131- name = "haskell-language-server" ;
132- src = final . fetchFromGitHub {
133- owner = "haskell" ;
134- repo = "haskell-language-server" ;
135- rev = "0.5.1" ;
136- sha256 = "17nzgpiacmrvwsy2fjx6a6pcpkncqcwfhaijvajm16jpdgni8mik" ;
137- fetchSubmodules = true ;
138- } ;
139- sha256map = {
140- "https://github.com/bubba/brittany.git" . "c59655f10d5ad295c2481537fc8abf0a297d9d1c" = "1rkk09f8750qykrmkqfqbh44dbx1p8aq1caznxxlw8zqfvx39cxl" ;
141- } ;
142- # Plan issues with the benchmarks, can try removing later
143- configureArgs = "--disable-benchmarks" ;
144- modules = [ {
145- # Tests don't pass for some reason, but this is a somewhat random revision.
146- packages . haskell-language-server . doCheck = false ;
147- } ] ;
148- } ) ) . haskell-language-server . components . exes . haskell-language-server ;
149- # When adding new versions here, please set "latest" too the latest version
150- # so that `tools = { haskell-language-server = "latest"; }`
151- # will work the same way it does for tools that are in hackage.
152- "latest" = final . haskell-nix . custom-tools . haskell-language-server . "0.8.0" ;
153- } // final . lib . mapAttrs ( rev : sha256 :
154- args :
155- ( final . haskell-nix . cabalProject ( args // {
156- name = "haskell-language-server" ;
157- src = final . fetchFromGitHub {
158- owner = "haskell" ;
159- repo = "haskell-language-server" ;
160- inherit rev sha256 ;
161- fetchSubmodules = true ;
162- } ;
163- sha256map = {
164- "https://github.com/bubba/brittany.git" . "c59655f10d5ad295c2481537fc8abf0a297d9d1c" = "1rkk09f8750qykrmkqfqbh44dbx1p8aq1caznxxlw8zqfvx39cxl" ;
165- "https://github.com/bubba/hie-bios.git" . "cec139a1c3da1632d9a59271acc70156413017e7" = "1iqk55jga4naghmh8zak9q7ssxawk820vw8932dhympb767dfkha" ;
166- } ;
167- # Plan issues with the benchmarks, can try removing later
168- configureArgs = "--disable-benchmarks" ;
169- } ) ) . haskell-language-server . components . exes . haskell-language-server
170- ) {
171- "0.6.0" = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj" ;
172- "0.7.1" = "0gkzvjx4dgf53yicinqjshlj80gznx5khb62i7g3kqjr85iy0raa" ;
173- "0.8.0" = "0p6fqs07lajbi2g1wf4w3j5lvwknnk58n12vlg48cs4iz25gp588" ;
174- } ;
99+ # Currently everything we want is in hackage.
100+ # Before addy anything here consider uploading to hackage instead.
101+ # If that is not possible look at the git history of this file to see examples
102+ # of how to add a custom-tool.
175103 } ;
176104} ; }
0 commit comments