Skip to content

Commit

Permalink
Clean up devShell definition
Browse files Browse the repository at this point in the history
Mostly formatting, but also
- removes Apple’s Cocoa from the dependencies,
- moves some dependencies from `buildInputs` to `nativeBuildInputs`.
  • Loading branch information
sellout committed Jul 17, 2024
1 parent 525e923 commit bf080a5
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions nix/haskell-nix-flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,29 @@
# 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.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 bf080a5

Please sign in to comment.