From 346454873ef27dc476fcbdab9a6b9188ab1d0fcb Mon Sep 17 00:00:00 2001 From: Dennis Gosnell Date: Sun, 11 Sep 2022 07:41:17 +0900 Subject: coqPackages.lib.overrideCoqDerivation: update documentation for overriding version --- pkgs/build-support/coq/extra-lib.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pkgs/build-support/coq') diff --git a/pkgs/build-support/coq/extra-lib.nix b/pkgs/build-support/coq/extra-lib.nix index 90600271d42b1..3c226b4920b62 100644 --- a/pkgs/build-support/coq/extra-lib.nix +++ b/pkgs/build-support/coq/extra-lib.nix @@ -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; -- cgit 1.4.1