-
Notifications
You must be signed in to change notification settings - Fork 4
Floco Packages Modules
flocoPackages- Scope used for configuring
flocoPackagesframework.Type: submodule
Declared by:
/floco/modules/packages/interface.nix
flocoPackages.packages- Collection of built/prepared packages and
modules.
Type: attribute set of attribute set of (submodule)
Declared by:
/floco/modules/packages/interface.nix
flocoPackages.packages.<name>.<name>.buildDependsOnLint- Causes
the
builtlifecycle stage to be blocked by successfullintchecking ( requiredlintto be non-null ).This is recommended for projects which are under active development.
If
preferMultipleOutputDerivationsis enabled this is implemented by making thelintderivation an input of thebuiltderivation. Otherwise this will cause apreBuildphase to runlintchecks, killing the builder if the check fails.NOTE: if
builtis an alias ofsource, this causes eitherinstalledorpreparedto depend onlintinstead.See Also: lint, installDependsOnTest
Type: boolean
Default:
falseDeclared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.built- “Built” form of a
package/module which is ready for distribution as a tarball (
buildandprepublishscripts must be run if defined ).By default the
devtree is used for this stage.If no build is required then this option is an alias of
source.XXX: If a
buildscript produces executable scripts you should NOT patch shebangs yet - patching should be deferred to thepreparedstage.Type: package
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.checkSystemSupport- A
function that checks if
stdenv.hostPlatformor asystempair can support a package. This uses translatedsysInforecords.Type: function that evaluates to a(n) boolean
Default:
<function, args: {platform?, stdenv?, system?}>Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.dist- Produce a distributable
tarball suitable for publishing using the
builtform of a package.This target should never be enabled for packages whose
sourceis already a registry tarball ( those withltypeoffile).The contents of this tarball will attempt to unpatch scripts using the original
sourcepackage’s contents - but if you produce any executables during your build it is your responsibility to ensure that they remain unpatched ( patching should be performed later during theprepareevent instead ).Type: null or package
Default:
nullDeclared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.global- Globally installed
form of a package which uses conventional
POSIXinstallation prefixes such aslib/node_modules/andbin/.Globally installed packages will carry their full runtime dependency tree as a subdir, allowing executables to resolve any necessary modules, and symlinks into other
node_modules/directories to behave as they would with other Node.js package management tools.NOTE: If a project has dependency cycles it may be necessary to enable the option
preferMultipleOutputDerivationsto allow anybuildorinstallstages to run.Type: package
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.installDependsOnTest- Causes
the
installedlifecycle stage to be blocked by successfultestchecking ( requiredtestto be non-null ).This is recommended for projects which are under active development.
If
preferMultipleOutputDerivationsis enabled this is implemented by making thetestderivation an input of theinstalledderivation. Otherwise this will cause a phase to runtestchecks beforeinstallevents, killing the builder if the check fails.NOTE: if
installedis an alias ofbuilt, this causes eitherpreparedto depend ontestinstead.See Also: test, buildDependsOnLint
Type: boolean
Default:
falseDeclared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.installed- “Installed” form
of a package/module which is ready consumption as a module in a
node_modules/directory, or global installation for use as a package.This stage requires that any
installscripts have been run, which conventionally means “runnode-gypto perform system dependant compilation or setup”.By default the
prodtree is used for this stage.If no install is required then this option is an alias of
built.XXX: If an
installscript produces executable scripts you should NOT patch shebangs yet - patching should be deferred to thepreparedstage.Type: package
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.key- Unique key used to refer
to this package in
treesubmodules and otherflococonfigs, metadata, and structures.Type: string
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.lint- Run lints against the
sourceof a package. By default this executes anylintscripts defined inpackage.jsonusing thedevtree.As an optimization you may explicitly define
treeInfo.lintallowingtreeInfo.devto be reduced to the subset of dependencies required to build, andtreeInfo.lintto be reduced to the subset of dependencies required to run lints. This approach is STRONGLY encouraged especially if you usejest,webpack, orbabelsince these packages’ all fail to properly adhere to Node.js resolution specifications for symlinks, and often require you to copy a massive pile of files into the sandbox.This target should never be enabled for packages/modules whose source was a distributed tarball ( those with
ltypeorfile) since these have already been linted as a part of their pre-release process.See Also: test
Type: null or package
Default:
nullDeclared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.pdef- Package’s declared
metadata normalized as
pdefsubmodule.Type: submodule
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.preferMultipleOutputDerivations- Whether
builders should prefer preparing sources with a single multiple output
derivation vs. multiple single output derivations.
Setting this to
falseis sometimes useful for breaking dependency cycles forglobalpackages or to intentionally introduce additional cache breakpoints in projects with excessively longbuildorinstallphases ( this may avoid rebuilds for certain types of changes to the dependency graph ).In general it is faster to use multiple output derivations, since most Node.js lifecycle stages execute relatively quickly, and splitting them requires a full sandbox to be created for each stage.
Type: unspecified value
Default:
falseDeclared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.prepared- Fully prepared form
of package/module tree making it ready for consumption as either a
globally installed package, or module under a
node_modules/tree.Generally this option is an alias of a previous stage; but this also provides a useful opportunity to explicitly define additional post-processing routines that don’t use default
builtorinstalledstage builders ( for example, setting executable bits or applying shebang patches to scripts ).Type: package
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.source- Unpacked source tree
used as the basis for package/module preparation.
It is strongly recommended that you use
config.pdef.sourceInfohere unless you are intentionally applying patches, filters, or your package resides in a subdir ofsourceInfo.XXX: This tree should NOT patch shebangs yet, since this would deprive builders which produce distributable tarballs or otherwise “un-nixify” a module of an “unpatched” point of reference to work with.
Type: package
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.supportedTree- A filtered
form of
treeInfowhich drops unsupported optional dependencies.Type: null or (attribute set of (attribute set of boolean))
Default:
nullDeclared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.supportedTree.<name>.dev- Whether
the dependency is required ONLY during pre-distribution phases. This
includes common tasks such as building, testing, and linting.
Type: boolean
Default:
falseDeclared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.supportedTree.<name>.key- Unique
key used to refer to this package in
treesubmodules and otherflococonfigs, metadata, and structures.Type: string
Declared by:
/floco/modules/package/interface.nix
flocoPackages.packages.<name>.<name>.test- Run tests against the
builtform of a package. By default this executes anytestscripts defined inpackage.jsonusing thedevtree.As an optimization you may explicitly define
treeInfo.testallowingtreeInfo.devto be reduced to the subset of dependencies required to build, andtreeInfo.testto be reduced to the subset of dependencies required to run tests. This approach is STRONGLY encouraged especially if you usejest,webpack, orbabelsince these packages’ all fail to properly adhere to Node.js resolution specifications for symlinks, and often require you to copy a massive pile of files into the sandbox.This target should never be enabled for packages/modules whose source was a distributed tarball ( those with
ltypeorfile) since these have already been tested as a part of their pre-release process.See Also: lint
Type: null or package
Default:
nullDeclared by:
/floco/modules/package/interface.nix
flocoPackages.pdefs- List of
pdefmetadata records for all known pacakges and modules. These records are used to generate build recipes and build plans.Type: attribute set of attribute set of (submodule)
Default:
{ }Example:
{ "@babel/cli" = { "7.20.7" = { "..." = "..."; key = "@babel/cli/7.20.7"; }; }; lodash = { "4.17.21" = { "..." = "..."; key = "lodash/4.17.21"; }; }; }Declared by:
/floco/modules/packages/interface.nix
flocoPackages.pdefs.<name>.<name>.ident- Package identifier/name
as found in
package.json:.name.Type: string matching the pattern (@[^@/]+/)?[^@/]+
Example:
"@floco/foo"Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.key- Unique key used to refer to
this package in
treesubmodules and otherflococonfigs, metadata, and structures.Type: string
Example:
"@floco/foo/4.2.0"Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.ltype- Package “lifecycle
type”/”pacote source type”. This option effects which lifecycle events
may run when preparing a package/module for consumption or
installation.
For example, the
file( distributed tarball ) lifecycle does not run anyscripts.[pre|post]buildphases or result in anydevDependenciesbeing added to the build plan - since these packages will have been “built” before distribution. However,scripts.[pre|post]installscripts ( generallynode-gypcompilation ) does run for thefilelifecycle.This option is effectively a shorthand for setting
lifecycledefaults, but may also used by some fetchers and scrapers.See Also: lifecycle, fetchInfo
Type: one of “file”, “link”, “dir”, “git”
Default:
"file"Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.binInfo- Indicates files or
directories which should be prepared for use as executable scripts.
Type: submodule
Default:
{ binDir = null; binPairs = { }; }Declared by:
/floco/modules/pdef/binInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.binInfo.binDir- Relative path to
a subdir from which all files should be prepared as executables.
Executable names will be defined as the basename of each file with any
extensions stripped.
Type: null or string
Default:
nullDeclared by:
/floco/modules/pdef/binInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.binInfo.binPairs- Pairs of
{ <EXE-NAME> = <REL-PATH>; ... }declarations mapping exposed executables scripts to their associated sources.Type: attribute set of string
Default:
{ }Declared by:
/floco/modules/pdef/binInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.depInfo- Information regarding
dependency modules/packages. This record is analogous to the various
package.json:.[dev|peer|optional|bundled]Dependencies[Meta]fields.These config settings do note necessarily dictate the contents of the
treeInfoconfigs, which are used by builders, but may be used to provide information needed to generate trees if they are not defined.Type: attribute set of (attribute set of boolean)
Default:
{ }Declared by:
/floco/modules/pdef/depInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.depInfo.<name>.bundled- Whether
the dependency is distributed in registry tarballs alongside the
consumer.
This is sometimes used to include patched modules, but whenver possible bundling should be avoided in favor of tooling like
esbuildorwebpackbecause the effect bundled dependencies have on resolution is fraught.Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/depInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.depInfo.<name>.descriptor- Descriptor
indicating version range or exact source required to satisfy a
dependency.
The value
"*"allows any version or source to be used, as long as it has the same identifier ( name ).Type: string
Default:
"*"Declared by:
/floco/modules/pdef/depInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.depInfo.<name>.dev- Whether the
dependency is required during pre-distribution phases. This includes
common tasks such as building, testing, and linting.
Type: boolean
Default:
trueDeclared by:
/floco/modules/pdef/depInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.depInfo.<name>.optional- Whether
the dependency may be omitted from the
node_modules/tree.Conventionally this is used to mark dependencies which are only required under certain conditions such as platform, architecture, or engines. Generally optional dependencies carry
sysInfoconditionals, orpostinstallscripts which must be allowed to fail without blocking the build of the consumer.Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/depInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.depInfo.<name>.pin- An exact
version number or URI indicating the “resolved” form of a dependency
descriptor.
This will be used for
treeInfoformation, and is available for usage by extensions tofloco.Type: null or string
Default:
nullDeclared by:
/floco/modules/pdef/depInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.depInfo.<name>.runtime- Whether
the dependency is required at runtime. Other package management tools
often refer to these as “production mode” dependencies.
Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/depInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.fetchInfo- Arguments passed to
fetcher. By default any `builtins.fetchTree’ or `builtins.path’ argset
is supported, and the correct fetcher can be inferred from these
values.
If set to `null’, `sourceInfo’ must be set explicitly.
Type: attribute set of (null or string or signed integer or boolean)
Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.fsInfo- Indicates information
about a package that must be scraped from its source tree, rather than
a conventional config file.
It is not recommended for users to manually fill these fields; rather we expect these to be informed by a cache or lockfile. You’re welcome to explicitly define them, but I don’t want to see anyone griping about these options in bug reports.
Type: submodule
Default:
{ dir = "."; gypfile = false; shrinkwrap = false; }Declared by:
/floco/modules/pdef/fsInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.fsInfo.dir- Relative path from
sourceInfo.outPathto the package’s root. This field is analogous to a flake input’sdirfield, and is used in combination withfetchInfoin exactly the same way as a flake input.You should almost never need to set this field for distributed tarballs ( only if it contains bundled dependencies ).
While this field is useful for working with monorepos I strongly recommend that you avoid abusing it. Its use inherently causes rebuilds of all projects in associated with a single
sourceInforecord for any change in the subtree. It is much more efficient to split a subtree into multiple sources, but I’ve left you enough rope to learn things the hard way if you insist on doing so. Consider yourself warned.Type: string
Default:
"."Declared by:
/floco/modules/pdef/fsInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.fsInfo.gypfile- Whether
binding.gypexists in the project root. May be explicitly overridden by declarations inpackage.json.WARNING: You must not set this field based on ANY metadata pulled from a registry. There is a bug in NPM v8 that caused thousands of registry packuments and vinfo records to be poisoned, and in addition to that there is conflicting reporting rules for this field in POST requests by various package managers such that you should effectively disregard the value entirely.
Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/fsInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.fsInfo.shrinkwrap- Whether
npm-shrinkwrap.jsonexists in the project root. This is distributed form ofpackage-lock.jsonwhich may be used to install exact dependencies during global installation of packages. For module/workspace installation this file takes precedence overpackage-lock.jsonif it exists.The use of
npm-shrinkwrap.jsonis only recommended for executables.NOTE:
flocodoes not usenpm-shrinkwrap.jsonat this time, so this field exists as a stub.Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/fsInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.lifecycle- Enables/disables
phases executed when preparing a package/module for consumption or
installation.
Executing a phase when no associated script is defined is not necessarily harmful, but has a drastic impact on performance and may cause infinite recursion if dependency cycles exist among packages.
See Also: ltype
Type: attribute set of boolean
Default:
{ build = false; install = false; }Declared by:
/floco/modules/pdef/lifecycle/interface.nix
flocoPackages.pdefs.<name>.<name>.lifecycle.build- Whether a
package or module requires build scripts to be run before it is
prepared for consumption.
This field should never be set to true when consuming registry tarballs even if they define build scripts, since they are distributed after being built by authors and maintainers.
Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/lifecycle/interface.nix
flocoPackages.pdefs.<name>.<name>.lifecycle.install- Whether a
package or module requires
[pre|post]installscripts ornode-gypcompilation to be performed before a distributed tarball is prepared for consumption.Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/lifecycle/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.lockDir- Path to the
directory containing
package-lock.json. We require this path so that we can fetch source trees declared as relative paths in the lockfile.NOTE: If your lockfile contains
../*relative paths it is strongly recommended that this option be set to a non-store path. If a store path such as/nix/store/xxxxx-source/../some-diris given, Nix will crash and burn attempting to fetchsome-dir. A common trick to ensure that you are passing a regular filesystem path is to stringize as:lockDir = toString ./.;.Type: null or path
Default:
nullExample:
"/home/camus/src/floco/modules/pdef/my-project"Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.metaRaw- Explicit
metadata provided by users as a form of override or method of caching.
This field is optional and while many translators may reference it I
want to once again highlight that ALL
metaFilesfields are strictly internal and should never be relied upon by builders or external extensions toflocosince they may change without warning or indication in semantic versioning of the framework.Type: attribute set of anything
Default:
{ }Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.pjs- Raw contents of
package.json.Type: attribute set of anything
Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.pjsDir- Path to the
directory containing
package.json. We require this path so that we can fetch source trees declared as relative paths in thepackage.jsonunderdependencies( and similar ) andworkspacesfields.NOTE: If your
package.jsoncontains../*relative paths it is strongly recommended that this option be set to a non-store path. If a store path such as/nix/store/xxxxx-source/../some-diris given, Nix will crash and burn attempting to fetchsome-dir. A common trick to ensure that you are passing a regular filesystem path is to stringize as:pjsDir = toString ./.;.Type: path
Example:
"/home/camus/src/floco/modules/pdef/my-project"Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.pjsKey- For
package.jsonfiles with workspaces, thepjsKeyis used to identify a workspace member.These keys are simply a relative path from the “root”
pjsDirto a sub-project’spjsDir.NOTE: This field is currently unused by
floco, but is future extensions will use it to support workspaces.Type: string
Default:
""Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.plent- Raw contents of
a
package-lock.json:.packages.*record.See Also: plock plentKey
Type: null or (attribute set of anything)
Default:
nullDeclared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.plentKey- The key used
to lookup a plent in
package-lock.json:.packages.*. This key is a relative path fromlockDirto the prospectivepjsDirof a package/module.Type: null or string
Default:
nullExample:
"node_modules/@babel/core/node_modules/semver"Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.metaFiles.plock- Raw contents of
package-lock.json.NOTE: This field must only be set when the “root” package in the lockfile is associated this the package being declared. Information concerning dependencies is instead stashed in
metaFiles.plent.*.See Also: plent
Type: null or (attribute set of anything)
Default:
nullDeclared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.peerInfo- Set of propagated
dependencies that consumers of this package/module must provide at
runtime.
Often peer dependencies are used to enforce interface alignment across a set of modules but do not necessarily imply that the requestor depends on the declared peer at build time or runtime - rather it states “my consumers depend on the declared peer as a side effect of their dependence on me”.
NOTE: For the purposes of
treeInfoand the construction of anode_modules/tree, if a module declares a peer then that peer must be placed in a “sibling” or parentnode_modules/directory, and never as a subdirectory of the requestor! The “sibling” case is why the term “peer” is used, indicating that these modules must be “peers” living in the samenode_modules/directory; in practice a parent directory also works, but you get the idea.Type: attribute set of (submodule)
Default:
{ }Declared by:
/floco/modules/pdef/peerInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.peerInfo.<name>.descriptor- Descriptor
indicating version range or exact source required to satisfy a peer
dependency.
The value
"*"allows any version or source to be used, as long as it has the same identifier ( name ).Type: string
Default:
"*"Declared by:
/floco/modules/pdef/peerInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.peerInfo.<name>.optional- Whether
consumers are required to provide the declared peer.
Optional peer declarations are conventionally used to handle platform or architecture dependant modules which are only required for certain systems - in general this field should be interpreted as “this peer dependency is required under certain conditions”. Often these conditions are audited using
postinstallscripts, and as an optimization it may be worthwhile to ignore those audits if their conditions can be asserted in Nix ( for example if you knowsystem, there’s no reason to use a derivation to run some JavaScript that probes and auditscpuandos).Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/peerInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.sourceInfo- Information about
the source tree a package resides in. This record is analogous to that
returned by
builtins.fetchTreefor flake inputs.Used in combination with
fetchInfoandfsInfo.dir, these three nuggets of metadata are isomorphic with a flake input.However, unlike flake inputs,
sourceInfo.outPathmay set to a derived store path if and only iffetchInfois explicitly set tonull. In this casefsInfo.diris still used to identify a pacakage/module’s root directory where we will attempt to readpackage.json( must exist ) and similar metadata files will be read from ( if they exist ).In this case you may avoid
IFDby explicitly setting top level fields, specificallylifecycle,sysInfo,binInfo, andtreeInfoordepInfowhich are required by builders.Alternatively you may explicitly set
metaFiles.{pjs,plock,plent,trees}fields directly - but keep in mind that these fields are never guaranteed to be stable and their schema may change at any time ( so set the top level ones unless you`re up for the maintenance ).Type: attribute set of (boolean or signed integer or string)
Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.sourceInfo.outPath- A Nix Store
path containing the unpacked source tree in which this package/module
resides. The package need not be at the root this path; but when the
project root is a subdir the option `fsInfo.dir` must be set in order
for `package.json` and other metadata to be translated.
Type: path
Declared by:
/floco/modules/pdef/interface.nix
flocoPackages.pdefs.<name>.<name>.sysInfo- Indicates platform,
arch, and Node.js version support.
Type: submodule
Default:
{ cpu = [ "*" ]; engines = { node = "*"; }; os = [ "*" ]; }Declared by:
/floco/modules/pdef/sysInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.sysInfo.cpu- List of supported
CPU architectures. The string
"*"indicates that all CPUs are supported.Type: list of (one of “*”, “x86_64”, “i686”, “aarch”, “aarch64”, “powerpc64le”, “mipsel”, “riscv64”, “unknown”)
Default:
[ "*" ]Declared by:
/floco/modules/pdef/sysInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.sysInfo.engines- Indicates
supported tooling versions.
Type: attribute set of string
Default:
{ node = "*"; }Declared by:
/floco/modules/pdef/sysInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.sysInfo.engines.node- Supported
Node.js versions.
Type: string
Default:
"*"Example:
">=14"Declared by:
/floco/modules/pdef/sysInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.sysInfo.os- List of supported
operating systems. The string
"*"indicates that all operating systems are supported.Type: list of (one of “*”, “darwin”, “freebsd”, “netbsd”, “linux”, “openbsd”, “sunprocess”, “win32”, “unknown”)
Default:
[ "*" ]Declared by:
/floco/modules/pdef/sysInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.treeInfo-
node_modules/trees used for various lifecycle events. These declarations are analogous to thepackage.*field found inpackage-lock.json(v2/3)files. This means that these fields should describe both direct and indirect dependencies for the full dependency graph.Tree declarations are expected to be pairs of
node_modules/paths to “keys” ( matching thekeyfield in its Nix declaration ):{ "node_modules/@foo/bar" = { key = "@foo/bar/1.0.0"; dev = true; ... }; "node_modules/@foo/bar/node_modules/baz" = { key = "baz/4.2.0"; dev = false; ... }; ... }In practice we expect users to explicitly define this field only for targets which they actually intend to create installables from, and we recommend using a
package-lock.json(v2/3)to fill these values.Type: null or (attribute set of (attribute set of boolean))
Default:
nullDeclared by:
/floco/modules/pdef/treeInfo/interface.nix
flocoPackages.pdefs.<name>.<name>.treeInfo.<name>.dev- Whether the
dependency is required ONLY during pre-distribution phases. This
includes common tasks such as building, testing, and linting.
Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/treeInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.treeInfo.<name>.key- Unique key
used to refer to this package in
treesubmodules and otherflococonfigs, metadata, and structures.Type: null or string
Default:
nullDeclared by:
/floco/modules/pdef/treeInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.treeInfo.<name>.optional- Whether
the dependency may be omitted from the
node_modules/tree.Conventionally this is used to mark dependencies which are only required under certain conditions such as platform, architecture, or engines. Generally optional dependencies carry
sysInfoconditionals, orpostinstallscripts which must be allowed to fail without blocking the build of the consumer.Type: boolean
Default:
falseDeclared by:
/floco/modules/pdef/treeInfo/single.interface.nix
flocoPackages.pdefs.<name>.<name>.version- Package version as
found in
package.json:.version.Type: string matching the pattern (0|[1-9]:digit:*)(.(0|[1-9]:digit:*)(.(0|[1-9]:digit:*))?)?(-((0|[1-9]:digit:*)|[0-9]*[[:alpha:]-][[:alnum:]-]*)(.((0|[1-9]:digit:*)|[0-9]*[[:alpha:]-][[:alnum:]-]*))*)?(\+[[:alnum:]-]+(.:alnum:+)*)?
Example:
"4.2.0"Declared by:
/floco/modules/pdef/interface.nix