@@ -174,9 +174,12 @@ let
175 prePatch = if (cabalFile != null)
175 prePatch = if (cabalFile != null)
176 then ''cat ${cabalFile} > ${package.identifier.name}.cabal''
176 then ''cat ${cabalFile} > ${package.identifier.name}.cabal''
178+ # When building hpack package we use the internal nix-tools
179+ # (compiled with a fixed GHC version)
177− else lib.optionalString (cabal-generator == "hpack") ''
180+ lib.optionalString (cabal-generator == "hpack") ''
178− ${buildPackages.haskell-nix.nix-tools.${compiler.nix-name}}/bin/hpack
181+ ${buildPackages.haskell-nix.internal-nix-tools}/bin/hpack
181 # patches can (if they like) depend on the version and revision of the package.
184 # patches can (if they like) depend on the version and revision of the package.
182 // lib.optionalAttrs (patches != []) {
185 // lib.optionalAttrs (patches != []) {