query
On this page

overrideCabal

pkgs.haskell.lib.overrideCabal

Docs pulled from | This Revision | 10 minutes ago


The function overrideCabal lets you alter the arguments to the mkDerivation function.

Inputs

drv

1. Function argument

f

2. Function argument

Examples

overrideCabal usage 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;