coqPackages.lib.overrideCoqDerivation: update documentation for overriding version

This commit is contained in:
Dennis Gosnell 2022-09-11 07:41:17 +09:00
parent 49e6d1b813
commit 346454873e
No known key found for this signature in database
GPG Key ID: 462E0C03D11422F4

View File

@ -170,11 +170,22 @@ with builtins; with lib; recursiveUpdate lib (rec {
different versions of dependencies:
```nix
coqPackages.QuickCick.override { ssreflect = my-cool-ssreflect; }
coqPackages.QuickChick.override { ssreflect = my-cool-ssreflect; }
```
whereas `overrideCoqDerivation` allows you to override arguments to the
call to `mkCoqDerivation` in the Coq library.
Note that all Coq libraries in Nixpkgs have a `version` argument for
easily using a different version. So if all you want to do is use a
different version, and the derivation for the Coq library already has
support for the version you want, you likely only need to update the
`version` argument on the library derivation. This is done with
`.override`:
```nix
coqPackages.QuickChick.override { version = "1.4.0"; }
```
*/
overrideCoqDerivation = f: drv: (drv.override (args: {
mkCoqDerivation = drv_: (args.mkCoqDerivation drv_).override f;