@@ -38,6 +38,9 @@ let
3838 # overridden with NIX_PATH.
3939 fetchExternal = import ./lib/fetch-external.nix;
4040
41+ # Function for cleaning haskell source directories pulled from iohk-nix
42+ cleanSourceHaskell = pkgs.callPackage ./lib/clean-source-haskell.nix {};
43+
4144 # All packages from Hackage as Nix expressions
4245 hackage = import (fetchExternal {
4346 name = "hackage-exprs-source";
@@ -108,7 +111,7 @@ let
108111 # Programs for generating Nix expressions from Cabal and Stack
109112 # files. We need to make sure we build this from the buildPackages,
110113 # we never want to actually cross compile nix-tools on it's own.
111− nix-tools = pkgs.buildPackages.callPackage ./nix-tools { inherit fetchExternal; inherit (self) mkCabalProjectPkgSet; };
114+ nix-tools = pkgs.buildPackages.callPackage ./nix-tools { inherit fetchExternal cleanSourceHaskell; inherit (self) mkCabalProjectPkgSet; };
112115
113116 # Function to call stackToNix
114117 callStackToNix = self.callPackage ./call-stack-to-nix.nix {};
@@ -127,6 +130,9 @@ let
127130 # Make this handy overridable fetch function available.
128131 inherit fetchExternal;
129132
133+ # Function for cleaning haskell source diretories.
134+ inherit cleanSourceHaskell;
135+
130136 # Produce a fixed output derivation from a moving target (hackage index tarball)
131137 hackageTarball = { index-state, sha256 }:
132138 pkgs.runCommand "01-index.tar.gz-at-${builtins.replaceStrings [":"] [""] index-state}" {