IHaskell/nix/mkDevShell.nix

40 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2023-07-08 01:39:10 -07:00
{ pkgs
, hls
, system
, version
2023-07-08 01:39:10 -07:00
, haskellPackages
, ihaskellOverlay
}:
let
# compilerVersion = builtins.substring 3 100 version;
2023-07-08 01:39:10 -07:00
devIHaskell = haskellPackages.developPackage {
root = pkgs.lib.cleanSource ../.;
name = "ihaskell";
returnShellEnv = false;
overrides = ihaskellOverlay;
withHoogle = true;
};
devModifier = drv:
pkgs.haskell.lib.addBuildTools drv (with haskellPackages; [
cabal-install
(pkgs.python3.withPackages (p: [p.jupyterlab]))
# Note: HLS support currently doesn't work, because the HLS project has removed
# HLS binaries from their flake; see
# https://github.com/haskell/haskell-language-server/pull/3804
# hls.packages.${system}."haskell-language-server-${compilerVersion}"
pkgs.cairo # for the ihaskell-charts HLS dev environment
pkgs.pango # for the ihaskell-diagrams HLS dev environment
pkgs.lapack # for the ihaskell-plot HLS dev environment
pkgs.blas # for the ihaskell-plot HLS dev environment
]);
in
(devModifier devIHaskell).envFunc {withHoogle=true;}