Add documenting comments to package.nix

This commit is contained in:
John Ericson 2023-12-03 18:39:33 -05:00
parent 77003a4f0c
commit f58615518c

View file

@ -43,22 +43,37 @@
#: #:
# This probably seems like too many degrees of freedom, but it # This probably seems like too many degrees of freedom, but it
# faithfully reflects how the underlying configure + make build system # faithfully reflects how the underlying configure + make build system
# work. The top-level flake.nix will choose useful combinations. # work. The top-level flake.nix will choose useful combinations of these
# options to CI.
, pname ? "nix" , pname ? "nix"
, versionSuffix ? "" , versionSuffix ? ""
, officialRelease ? false , officialRelease ? false
# Whether to build Nix. Useful to skip for tasks like (a) just
# generating API docs or (b) testing existing pre-built versions of Nix
, doBuild ? true , doBuild ? true
# Run the unit tests as part of the build. See `installUnitTests` for an
# alternative to this.
, doCheck ? __forDefaults.canRunInstalled , doCheck ? __forDefaults.canRunInstalled
# Run the functional tests as part of the build.
, doInstallCheck ? test-client != null || __forDefaults.canRunInstalled , doInstallCheck ? test-client != null || __forDefaults.canRunInstalled
# Check test coverage of Nix. Probably want to use with with at least
# one of `doCHeck` or `doInstallCheck` enabled.
, withCoverageChecks ? false , withCoverageChecks ? false
# Whether to build the regular manual # Whether to build the regular manual
, enableManual ? __forDefaults.canRunInstalled , enableManual ? __forDefaults.canRunInstalled
# Whether to compile `rl-next.md`, the release notes for the next
# not-yet-released version of Nix in the manul, from the individual
# change log entries in the directory.
, buildUnreleasedNotes ? false , buildUnreleasedNotes ? false
# Whether to build the internal API docs, can be done separately from # Whether to build the internal API docs, can be done separately from
# everything else. # everything else.
, enableInternalAPIDocs ? false , enableInternalAPIDocs ? false
@ -350,8 +365,13 @@ in {
platforms = lib.platforms.unix; platforms = lib.platforms.unix;
mainProgram = "nix"; mainProgram = "nix";
broken = !(lib.all (a: a) [ broken = !(lib.all (a: a) [
# We cannot run or install unit tests if we don't build them or
# Nix proper (which they depend on).
(installUnitTests -> doBuild) (installUnitTests -> doBuild)
(doCheck -> doBuild) (doCheck -> doBuild)
# We have to build the manual to build unreleased notes, as those
# are part of the manual
(buildUnreleasedNotes -> enableManual)
]); ]);
}; };