I’ve written some GHC patches that affect only the Haskell RTS and the behaviour of GHCI.
How can I craft a nix expression such that all Haskell dependencies of my package come from cache.nixos.org as usual, but for the final application, my custom GHC is used?
I tried passing --with-ghc to Cabal, but that doesn’t have any of the dependencies, because the ghcWithPackages / ghc-with-packages derivation is constructed such that it has the packages in lib/ and the ghc in bin/, and if I give the GHC in there, Cabal will also use it for ghc-pkg.