dream2nix beta

dream2nix scans your flake files and turns them into packages.

Installation

To use these options, add to your flake inputs:

dream2nix.url = "github:nix-community/dream2nix";

and inside the mkFlake:

imports = [
  inputs.dream2nix.flakeModuleBeta
];

Run nix flake lock and you're set.

Options

dream2nix.config

dream2nix.config.packagesDir

dream2nix.config.modules

dream2nix.config.overridesDirs

dream2nix.config.projectRoot

dream2nix.config.repoName

dream2nix.lib

perSystem.dream2nix.inputs

perSystem.dream2nix.inputs.<name>.packageOverrides

perSystem.dream2nix.inputs.<name>.inject

perSystem.dream2nix.inputs.<name>.pname

perSystem.dream2nix.inputs.<name>.projects

perSystem.dream2nix.inputs.<name>.projects.<name>.name

perSystem.dream2nix.inputs.<name>.projects.<name>.relPath

perSystem.dream2nix.inputs.<name>.projects.<name>.subsystem

perSystem.dream2nix.inputs.<name>.projects.<name>.subsystemInfo

perSystem.dream2nix.inputs.<name>.projects.<name>.translator

perSystem.dream2nix.inputs.<name>.projects.<name>.version

perSystem.dream2nix.inputs.<name>.settings

perSystem.dream2nix.inputs.<name>.source

perSystem.dream2nix.inputs.<name>.sourceOverrides

perSystem.dream2nix.instance

perSystem.dream2nix.outputs

dream2nix.config

The dream2nix config.

Type: submodule

Default:

{
  projectRoot = self;
}

Declared by:

dream2nix/src/modules/flake-parts/interface.nix

dream2nix.config.packagesDir

Relative path to the project root to put generated dream-lock files in.

Type: Relative path in a string.

Default: "./dream2nix-packages"

Declared by:

dream2nix/src/modules/config/interface.nix

dream2nix.config.modules

Extra modules to import in while evaluating the dream2nix framework. This allows you to add new discoverers, translators, builders etc. and lets you override existing ones.

Type: list of path

Default: [ ]

Declared by:

dream2nix/src/modules/config/interface.nix

dream2nix.config.overridesDirs

Override directories to pull overrides from.

Type: list of path

Default: [ ]

Declared by:

dream2nix/src/modules/config/interface.nix

dream2nix.config.projectRoot

Absolute path to the root of this project.

Type: null or path

Default: null

Declared by:

dream2nix/src/modules/config/interface.nix

dream2nix.config.repoName

Name of the repository this project is in.

Type: null or string

Default: null

Declared by:

dream2nix/src/modules/config/interface.nix

dream2nix.lib

The system-less dream2nix library. This should be the the lib attribute of the dream2nix flake.

Type: raw value (read only)

Declared by:

dream2nix/src/modules/flake-parts/interface.nix

perSystem.dream2nix.inputs

A list of inputs to generate outputs from. Each one takes the same arguments makeOutputs takes.

Type: attribute set of (submodule)

Default: { }

Declared by:

dream2nix/src/modules/flake-parts/interface.nix

perSystem.dream2nix.inputs.<name>.packageOverrides

Overrides to customize build logic for dependencies or top-level packages

Type: lazy attribute set of (attribute set)

Default: { }

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.inject

Inject missing dependencies into the dependency tree

Type: lazy attribute set of list of list of string

Default: { }

Example:

{
  foo."6.4.1" = [
    ["bar" "13.2.0"]
    ["baz" "1.0.0"]
  ];
  "@tiptap/extension-code"."2.0.0-beta.26" = [
    ["@tiptap/core" "2.0.0-beta.174"]
  ];
};

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.pname

The name of the package to be built with dream2nix

Type: null or string

Default: null

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.projects

Projects that dream2nix will build

Type: attribute set of (submodule)

Default: { }

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.projects.<name>.name

Name of the project

Type: string

Default: "‹name›"

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.projects.<name>.relPath

Relative path to project tree from source

Type: string

Default: ""

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.projects.<name>.subsystem

Name of subsystem to use. Examples: rust, python, nodejs

Type: string

Example: "nodejs"

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.projects.<name>.subsystemInfo

Translator specific arguments

Type: lazy attribute set of anything

Default: { }

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.projects.<name>.translator

Translators to use

Type: string

Example:

[
  "yarn-lock"
  "package-json"
]

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.projects.<name>.version

Version of the project

Type: null or string

Default: null

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.settings

Settings to customize dream2nix’s behaviour.

    This is likely to be removed in the future:
    Quote from DavHau @ https://github.com/nix-community/dream2nix/pull/399/files#r1036801060:
    Eventually this option should be removed.
    This custom settings merging logic I once implemented is an ugly quick hack,
    and not needed anymore since we now have the module system for merging options.

Type: list of (attribute set)

Default: [ ]

Example:

[
  {
    aggregate = true;
  }
  {
    filter = <function>;
    subsystemInfo = {
      nodejs = 18;
      npmArgs = "--legacy-peer-deps";
    };
  }
]

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.source

Source of the package to build with dream2nix

Type: path or package

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.inputs.<name>.sourceOverrides

Override the sources of dependencies or top-level packages. For more details, refer to https://nix-community.github.io/dream2nix/intro/override-system.html

Type: function that evaluates to a(n) lazy attribute set of list of package

Default: <function>

Example:

oldSources: {
bar."13.2.0" = builtins.fetchTarball {
  url = "https://example.com/example.tar.gz";
  sha256 = "sha256-0000000000000000000000000000000000000000000=";
};
baz."1.0.0" = builtins.fetchTarball {
  url = "https://example2.com/example2.tar.gz";
  sha256 = "sha256-0000000000000000000000000000000000000000000=";
};

Declared by:

dream2nix/src/modules/flake-parts/makeOutputsArgs.nix

perSystem.dream2nix.instance

The dream2nix instance.

Type: raw value (read only)

Declared by:

dream2nix/src/modules/flake-parts/interface.nix

perSystem.dream2nix.outputs

The raw outputs that were generated for each input.

Type: lazy attribute set of lazy attribute set of raw value (read only)

Declared by:

dream2nix/src/modules/flake-parts/interface.nix