3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

26 commits

Author SHA1 Message Date
Malte Brandy a0809c0293 haskellPackages.hoogleLocal: allow substitutes again
This is a follow up to the discussion in https://github.com/NixOS/nixpkgs/pull/165337
2022-06-05 13:17:43 +02:00
Profpatsch 7f08e0ca6d haskellPackages.hoogleLocal: build database locally 2022-03-22 22:36:59 +01:00
sternenseemann fb075fab73 haskellPackages.{ghcWithPackages, ghcWithHoogle}: make overrideable
This is achieved by passing the entire package set to the respective
wrappers and passing the select function as a second attribute. Together
with the new support for callPackage-ing functions this allows for
things like `ghcWithPackages.override { useLLVM = true; } (p: [ … ])`.

To make this possible for `ghcWithHoogle` as well, we need to make the
wrapper a bit more bespoke and inline the hoogle feature as well. The
hoogle wrapper, however, can remain separate and is exposed as
`hoogleWithPackages` additionally, as it can also serve standalone use.
`hoogleLocal` is kept for backwards compatibility (including the old,
suboptimal API), but will inform users about the better alternative via
a warning.
2022-01-06 12:21:45 +01:00
Joe Hermaszewski d8daa7af73
haskellPackages.shellFor: Work around hoogle generation failure
Workaround for https://github.com/NixOS/nixpkgs/issues/82245

Although this doesn't tackle the root cause of a null package sneaking
in (via executableHaskellDepends), it does effectively treat the symptom
by just ignoring any null packages.

Seeing as that issue has been open for more than a year I think this
band-aid is necessary.
2021-06-16 12:13:49 +08:00
volth bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Ben Siraphob 2f78ee7e81 pkgs/development: stdenv.lib -> lib 2021-01-24 00:16:29 +07:00
John Ericson ad93663a48 ghcWithHoogle: Fix for cross
Use `buildPackages.stdenv.mkDerivation` because we are making a shell
script to start hoogle on the build platform.
2019-12-24 18:17:41 -05:00
Travis Whitaker f1e3a6961b Pass hoogle-local's buildCommand as a file.
This is necessary when a very large number of packages are included in the
package database. Without this change, setting up the build environment will
fail, since the environment will be too large.

This simply applies the technique mentioned in
https://github.com/NixOS/nixpkgs/issues/25057 to solve this problem.
2019-09-03 09:23:28 +02:00
volth 6d2857a311 [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +00:00
volth 87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
Peter Simons f13f2434d0
Revert "Fix null deps in ghcWithHoogle" 2018-06-22 14:21:44 +02:00
Will Fancher dc7a91392e Fix null deps in ghcWithHoogle 2018-06-21 17:53:37 -04:00
Peter Simons 6fe751fb5c ghcWithHoogle: deal gracefully with packages that have no haddockDir attribute 2017-08-19 17:20:39 +02:00
Peter Simons 01b8c4c9e5 ghcWithHoogle: cosmetic for the sake of Emacs syntax highlighting 2017-08-19 17:19:47 +02:00
Profpatsch 4a8efae000 pkgs/haskell-modules/hoogle.nix: find haddocks by haddockDir
Previously a few clumsy shell globs were used to find haddock output, which
broke every time something in `generic-builder.nix` changed.
Use the new `haddockDir` identifier exported by haskell packages.
2017-08-06 22:02:50 +02:00
Bas van Dijk 057fae5ea0 ghcWithHoogle: fix for ghcjs
`haskell.packages.ghcjs.ghcWithHoogle` failed because the following line:

  for docdir in ${ghc.doc}/${docLibGlob}/*; do

failed because `doc` is not an attribute of `ghc` when `ghc` is
substituted for ghcjs.
2017-02-14 22:50:29 +01:00
Profpatsch b8a69aaba9 haskell/hoogle.nix: make an empty packages list possible
Building hoogle environments with an empty list of packages threw a built-time
error. This was particularly confusing when giving e.g. `(hps: [hps.Cabal])`
which, since `Cabal` is set to `null` (because it’s a distribution package),
would have lead to the same error as an empty list.

It was not useful to throw an error at all, because sometimes one only wants to
build an environment for the distribution packages; also the default value for
packages wasn’t even a valid value, so it is removed.
2016-11-24 12:31:58 +01:00
Michael Alan Dorman f16f2017ac Make hoogle-local compatible wih hoogle >= 5.0.4 2016-09-20 12:04:46 +02:00
Alexey Shmalko 87aa864ff9
haskell-hoogle: adapt to GHC docs split
The docs were split at #16167 and broke google support. @peti fixed
build, however hoogle still didn't see packages shipped with GHC. This
patch fixes location of the libraries shipped with GHC.
2016-06-20 22:52:20 +03:00
Peter Simons 06489a1850 haskell-hoogle: remedy some fallout from https://github.com/NixOS/nixpkgs/pull/16167
ghcWithHoogle builds with this patch applied, but it's probably still broken in
the sense that links might point nowhere or that the generated databases and/or
documentation might be incomplete.
2016-06-20 14:50:52 +02:00
Charles Strahan 142b417284 ghcWithHoogle: fix haddocks for GHCJS builtin libs 2016-02-01 00:10:45 -05:00
Charles Strahan 1a2d7c679a ghcWithHoogle: add support for ghcjs 2016-01-31 23:00:43 -05:00
Peter Simons 07542d12ea hoogle: use $NIX_BUILD_CORES to determine the proper level of parallelism for database creation 2015-09-02 16:28:01 +02:00
Jan Malakhovski 0013743845 haskell-packages: make hoogle wrapper much more helpful
* Build most of the stuff on /tmp, not in /nix/store.
* Generate hoogle database for all the dependencies.
* Generate haddock index and contents files.
* Cleanup.
2015-08-18 19:56:17 +00:00
Jan Malakhovski d8487667cf haskell-packages: bring hoogle to the masses by imlementing ghcWithHoogle
Replace `ghcWithPackages` to `ghcWithHoogle` in your config and enjoy.
2015-08-18 19:56:16 +00:00
Charles Strahan 3859f7bdab haskell-ng: hoogleLocal support 2015-06-11 20:25:31 -04:00