paths - options
deps
All dependencies of the package. This option should be set by the “outer world” and can be used to inherit attributes from pkgs
or inputs
etc.
By separating the task of retrieving things from the outside world, it is ensured that the dependencies are overridable.
Nothing will stop users from adding nixpkgs
itself as a dependency, but this will make it very hard for the user of the package to override any dependencies, because they’d have to figure out a way to insert their changes into the Nixpkgs fixpoint. By adding specific attributes to deps
instead, the user has a realistic chance of overriding those dependencies.
So deps should be specific, but not overly specific. For instance, the caller shouldn’t have to know the version of a dependency in order to override it. The name should suffice. (e.g. nix = nixVersions.nix_2_12
instead of inherit (nixVersions) nix_2_12
.
Type: lazy attribute set of raw value
Default:
{ }
Example:
{nixpkgs, ...}: {
inherit (nixpkgs) stdenv;
inherit (nixpkgs.haskellPackages) pandoc;
}
Declared by:
paths.package
Path to the directory containing the definition of the current package. Relative to ‘paths.projectRoot’.
This helps locating package definitions for lock & update scripts.
Type: path or string
Declared by:
paths.cacheFile
Path to the eval cache file of the current package. Relative to “${paths.projectRoot}/${paths.package}”".
Type: string
Default:
"cache.json"
Declared by:
paths.lockFile
Path to the lock file of the current package. Relative to “${paths.projectRoot}/${paths.package}”".
Type: string
Default:
"lock.json"
Declared by:
paths.projectRoot
Path to the root of the project on which dream2nix operates. Must contain the marker file specified by ‘paths.projectRootFile’
This helps locating lock files at evaluation time.
Type: path
Example:
./.
Declared by:
paths.projectRootFile
File name to look for to determine the root of the project. Ensure ‘paths.projectRoot’ contains a file named like this.
This helps locating package definitions for lock & update scripts.
Type: string
Default:
".git"
Example:
".git"
Declared by: