overrideCabal
pkgs.haskell.lib.overrideCabal
Docs pulled from | This Revision | about 1 hour ago
The function overrideCabal lets you alter the arguments to the mkDerivation function.
Example:
First, note how the aeson package is constructed in hackage-packages.nix:
"aeson" = callPackage ({ mkDerivation, attoparsec, <snip>
}:
mkDerivation {
pname = "aeson";
<snip>
homepage = "https://github.com/bos/aeson";
})
The mkDerivation function of haskellPackages will take care of putting the homepage in the right place, in meta.
> haskellPackages.aeson.meta.homepage
"https://github.com/bos/aeson"
> x = haskell.lib.overrideCabal haskellPackages.aeson (old: { homepage = old.homepage + "#readme"; })
> x.meta.homepage
"https://github.com/bos/aeson#readme"
Noogle detected
Implementation
The following is the current implementation of this function.
overrideCabal = drv: f: compose.overrideCabal f drv;