You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hPkgs.haskell-language-server # LSP server for editor
329
+
hPkgs.implicit-hie # auto generate LSP hie.yaml file from cabal
330
+
hPkgs.retrie # Haskell refactoring tool
331
+
# hPkgs.cabal-install
332
+
stack-wrapped
333
+
pkgs.zlib # External C library needed by some Haskell packages
334
+
];
335
+
336
+
# Wrap Stack to work with our Nix integration. We don't want to modify stack.yaml so non-Nix users don't notice anything.
337
+
# - no-nix: We don't want Stack's way of integrating Nix.
338
+
# --system-ghc # Use the existing GHC on PATH (will come from this Nix file)
339
+
# --no-install-ghc # Don't try to install GHC if no matching GHC found on PATH
320
340
stack-wrapped = pkgs.symlinkJoin {
321
-
name = "stack";
341
+
name = "stack"; # will be available as the usual `stack` in terminal
322
342
paths = [ pkgs.stack ];
323
343
buildInputs = [ pkgs.makeWrapper ];
324
344
postBuild = ''
325
345
wrapProgram $out/bin/stack \
326
346
--add-flags "\
327
-
--nix \
328
-
--no-nix-pure \
329
-
--nix-shell-file=flake-stack-integration.nix \
347
+
--no-nix \
348
+
--system-ghc \
349
+
--no-install-ghc \
330
350
"
331
351
'';
332
352
};
333
353
in {
334
354
devShells.default = pkgs.mkShell {
335
-
buildInputs = [ stack-wrapped ];
355
+
buildInputs = myDevTools;
336
356
337
-
# Configure the Nix path to our own pinned package set, to ensure Stack uses the same one rather than another global <nixpkgs> when looking for the right `ghc` argument to pass in `flake-stack-integration.nix`
338
-
# See https://nixos.org/nixos/nix-pills/nix-search-paths.html for more information
339
-
NIX_PATH = "nixpkgs=" + pkgs.path;
357
+
# Make external Nix c libraries like zlib known to GHC, like pkgs.haskell.lib.buildStackProject does
0 commit comments