Nixify software with less effort [maintainer=@DavHau]
Go to file
2022-03-27 21:45:31 +07:00
.github/workflows add github action to check formatting 2022-03-07 18:06:28 +07:00
docs fix URL to overrides in docs 2022-02-18 15:14:01 +07:00
notes fix node2nix builder 2021-09-22 00:30:56 +01:00
overrides/nodejs treewide: format with alejandra 1.0.0 2022-03-07 18:06:18 +07:00
src add sourceOverrides to lib2 2022-03-27 21:45:31 +07:00
tests disable go translator 2022-03-12 23:08:02 +07:00
.envrc add .envrc 2022-02-27 15:20:11 +07:00
.gitignore formatting: add flake apps + prepare hooks 2022-03-07 13:57:22 +07:00
ci.nix treewide: format with alejandra 1.0.0 2022-03-07 18:06:18 +07:00
flake.lock formatting: add flake apps + prepare hooks 2022-03-07 13:57:22 +07:00
flake.nix Add aarch64-linux support 2022-03-13 02:06:23 +01:00
LICENSE Initial commit 2021-09-03 17:30:52 +02:00
README.md add matrix link to readme 2022-03-12 21:07:27 +07:00
shell.nix add pre-commit shellHook 2022-03-07 18:25:38 +07:00
treefmt.toml fixup formatting issues 2022-03-07 18:06:28 +07:00

[WIP] dream2nix - A framework for 2nix tools

dream2nix is a framework for 2nix converters (converting from other build systems to nix). It focuses on the following aspects:

  • Modularity
  • Customizability
  • Maintainability
  • Nixpkgs Compatibility (not enforcing IFD)
  • Code de-duplication across 2nix converters
  • Code de-duplication in nixpkgs
  • Risk free opt-in FOD fetching (no reproducibility issues)
  • Common UI across 2nix converters
  • Reduce effort to develop new 2nix solutions
  • Exploration and adoption of new nix features
  • Simplified updating of packages

The goal of this project is to create a standardized, generic, modular framework for 2nix solutions, aiming for better flexibility, maintainability and usability.

The intention is to integrate many existing 2nix converters into this framework, thereby improving many of the previously named aspects and providing a unified UX for all 2nix solutions.

Test the experimental version of dream2nix

There are different ways how dream2nix can be invoked (CLI, flake, In-tree, IFD). A simple way to use dream2nix is to drop the following flake.nix inside the repository of the project intended to be packaged:

{
  inputs.dream2nix.url = "github:nix-community/dream2nix";
  outputs = { self, dream2nix }@inputs:
    let
      dream2nix = inputs.dream2nix.lib.init {
        # modify according to your supported systems
        systems = [ "x86_64-linux" ];
        config.projectRoot = ./. ;
      };
    in dream2nix.makeFlakeOutputs {
      source = ./.;

      # configure package builds via overrides
      packageOverrides = {
        # name of the package
        package-name = {
          # name the override
          add-pre-build-steps = {
            # override attributes
            preBuild = "...";
            # update attributes
            buildInputs = old: old ++ [ pkgs.hello ];
          };
        };
      };
    };
}

After adding the flake.nix, execute the following commands to list the packages which can be built:

git add ./flake.nix
nix flake show

Watch the recent presentation

dream2nix - A generic framework for 2nix tools

Further Reading

Community

matrix: https://matrix.to/#/#dream2nix:nixos.org