From 3cfe2fe9668b430ab7e2f1f36e5a3765fef145de Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Wed, 27 Apr 2022 15:03:34 -0400 Subject: [PATCH] Use pkgs.nix-gitignore --- flake.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 951b39b..f19e36a 100644 --- a/flake.nix +++ b/flake.nix @@ -26,11 +26,15 @@ # nix-env -f "" -qaP -A haskell.compiler hp = pkgs.haskellPackages; # pkgs.haskell.packages.ghc921; + # Paths to ignore when building the cabal package. + # FIXME: Why does changing any of this this retrigger Nix builds anyway? + ignorePatterns = [ "*.nix" "flake.lock" "*.md" "fourmolu.yaml" "hie.yaml" "bin" ".envrc" ".ghcid" ".gitattributes" ".github" ".gitignore" ".vscode" ]; + project = returnShellEnv: hp.developPackage { inherit returnShellEnv; name = "haskell-template"; - root = ./.; + root = pkgs.nix-gitignore.gitignoreSource ignorePatterns ./.; withHoogle = false; overrides = self: super: with pkgs.haskell.lib; { # Use callCabal2nix to override Haskell dependencies here