Skip to content

Commit

Permalink
Merge pull request #5233 from sellout/cachix-in-dev-shell
Browse files Browse the repository at this point in the history
  • Loading branch information
aryairani authored Jul 19, 2024
2 parents 2cf03fe + f189432 commit 8e469ad
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions nix/haskell-nix-flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,30 @@
# https://github.com/input-output-hk/haskell.nix/issues/1793
# https://github.com/input-output-hk/haskell.nix/issues/1885
allToolDeps = false;
additional = hpkgs: with hpkgs; [Cabal stm exceptions ghc ghc-heap];
buildInputs = let
native-packages =
lib.optionals pkgs.stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [Cocoa]);
in

additional = hpkgs:
(args.additional or (_: [])) hpkgs
++ [
hpkgs.Cabal
hpkgs.exceptions
hpkgs.ghc
hpkgs.ghc-heap
hpkgs.stm
];
buildInputs =
(args.buildInputs or [])
++ [pkgs.stack-wrapped pkgs.hpack pkgs.pkg-config pkgs.zlib pkgs.glibcLocales]
++ native-packages;
++ [
pkgs.glibcLocales
pkgs.zlib
];
nativeBuildInputs =
(args.nativeBuildInputs or [])
++ [
pkgs.cachix
pkgs.hpack
pkgs.pkg-config
pkgs.stack-wrapped
];
# workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/11042
shellHook = ''
export LD_LIBRARY_PATH=${pkgs.zlib}/lib:$LD_LIBRARY_PATH
Expand Down

0 comments on commit 8e469ad

Please sign in to comment.