anchor.diff:  
     installCheckTarget = [ "check" ];
   
  -  passthru = { inherit ocamlPackages; };
  +  passthru = {
  +    inherit coq-version ocamlPackages;
  +    dontFilter = true; # Useful to use mkCoqPackages from <nixpkgs>
  +  };
  +
  +  setupHook = writeText "setupHook.sh" "
  +    addCoqPath () {
  +      if test -d \"$1/lib/coq/${coq-version}/user-contrib\"; then
  +        export COQPATH=\"$COQPATH\${COQPATH:+:}$1/lib/coq/${coq-version}/user-contrib/\"
  +      fi
  +    }
  +
  +    addEnvHooks \"$targetOffset\" addCoqPath
  +  ";
   
     meta = {
       description = "Coq proof assistant";
  
positive.code:     '';
      homepage = http://coq.inria.fr;
      license = licenses.lgpl21;
    };
  
  }
  
negative.code: , shell ? false
    # We don't use lib.inNixShell because that would also apply
    # when in a nix-shell of some package depending on this one.
  , coq-version ? "8.10-git"
  }:
  
  with pkgs;
  