summary refs log tree commit diff
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-01-18 12:02:29 -0500
committerShea Levy <shea@shealevy.com>2018-01-18 12:02:29 -0500
commitf12f2ed44c66ac65b0307f3562152e9a45251d11 (patch)
tree545c734aede0deb63692d261c467e391548f2ea6
parente1db0afd61e8de0a148af4e4acc5550b8bfdaa0d (diff)
downloadnixlib-f12f2ed44c66ac65b0307f3562152e9a45251d11.tar
nixlib-f12f2ed44c66ac65b0307f3562152e9a45251d11.tar.gz
nixlib-f12f2ed44c66ac65b0307f3562152e9a45251d11.tar.bz2
nixlib-f12f2ed44c66ac65b0307f3562152e9a45251d11.tar.lz
nixlib-f12f2ed44c66ac65b0307f3562152e9a45251d11.tar.xz
nixlib-f12f2ed44c66ac65b0307f3562152e9a45251d11.tar.zst
nixlib-f12f2ed44c66ac65b0307f3562152e9a45251d11.zip
haskell-ide-engine: Fix build in sandbox
-rw-r--r--pkgs/development/haskell-modules/hie-packages.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/development/haskell-modules/hie-packages.nix b/pkgs/development/haskell-modules/hie-packages.nix
index 5ed5fb62ca00..c5eab4fabab5 100644
--- a/pkgs/development/haskell-modules/hie-packages.nix
+++ b/pkgs/development/haskell-modules/hie-packages.nix
@@ -219,7 +219,7 @@ in
        , ghc-mod-core, gitrev, haskell-lsp, hie-apply-refact, hie-base
        , hie-brittany, hie-build-plugin, hie-eg-plugin-async
        , hie-example-plugin2, hie-ghc-mod, hie-ghc-tree, hie-haddock
-       , hie-hare, hie-hoogle, hie-plugin-api, hoogle, hslogger, hspec
+       , hie-hare, hie-hoogle, hie-plugin-api, hoogle, hoogleLocal, hslogger, hspec
        , lens, mtl, optparse-simple, QuickCheck, quickcheck-instances
        , sorted-list, stm, text, time, transformers
        , unordered-containers, vector, vinyl, yaml, yi-rope
@@ -253,14 +253,20 @@ in
            quickcheck-instances stm text transformers unordered-containers
            vector vinyl yaml
          ];
-         preCheck = "export HOME=$NIX_BUILD_TOP/home; mkdir $HOME";
+
+         preCheck =
+           ''
+             export HOME=$NIX_BUILD_TOP/home
+             mkdir -p $HOME/.hoogle
+             ln -sv ${hoogleLocal}/share/doc/hoogle/default.hoo $HOME/.hoogle/default-haskell-${hoogle.version}.hoo
+           '';
          # https://github.com/haskell/haskell-ide-engine/issues/425
          # The disabled tests do work in a local nix-shell with cabal available.
          patches = [ ./patches/hie-testsuite.patch ];
          homepage = "http://github.com/githubuser/haskell-ide-engine#readme";
          description = "Provide a common engine to power any Haskell IDE";
          license = stdenv.lib.licenses.bsd3;
-      }) { inherit hoogle; };
+      }) { inherit hoogle; hoogleLocal = (self.hoogleLocal {}).override { inherit hoogle; }; };
     hie-apply-refact = callPackage
       ({ mkDerivation, aeson, apply-refact, base, either, extra, ghc-mod
        , ghc-mod-core, haskell-src-exts, hie-base, hie-plugin-api, hlint