Haskell infrastructure: fix #9871 (overrideCabal)

As per the recommendation by @Mathnerd314, this change seems to work
with the testing I did.

It makes sense to me why it works, but I think it's in an important
enough place that someone with much deeper knowledge of Haskell
infrastructure in Nixpkgs should give it a really heavy review.

I also consolidated all the overrideCabal definitions (there were two)
into a single definition in haskell-modules/lib.nix.
This commit is contained in:
Sukant Hajra
2017-02-09 23:07:40 -06:00
parent 96d07508bf
commit 98617ccb99
2 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
rec {
overrideCabal = drv: f: (drv.override (args: args // {
mkDerivation = drv: args.mkDerivation (drv // f drv);
mkDerivation = drv: (args.mkDerivation drv).override f;
})) // {
overrideScope = scope: overrideCabal (drv.overrideScope scope) f;
};