dream2nix/README.md

61 lines
2.5 KiB
Markdown
Raw Normal View History

2021-10-13 03:23:32 +03:00
<p align="center">
<img width="400" src="https://gist.githubusercontent.com/DavHau/755fed3774e89c0b9b8953a0a25309fa/raw/e2a12a60ae49aa5eb11b42775abdd1652dbe63c0/dream2nix-01.png">
2021-10-13 03:23:32 +03:00
</p>
## [WIP] dream2nix - A framework for 2nix tools
2021-09-29 20:27:49 +03:00
2021-11-07 17:31:24 +03:00
For an example of dream2nix being used in practice, see [dreampkgs](https://github.com/DavHau/dreampkgs).
2021-11-07 14:48:16 +03:00
---
dream2nix is a framework for 2nix converters (converting from other build systems to nix).
2021-09-03 18:32:00 +03:00
It focuses on the following aspects:
2021-09-29 20:27:49 +03:00
- 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
2021-09-03 18:32:00 +03:00
The goal of this project is to create a standardized, generic, modular framework for 2nix solutions, aiming for better flexibility, maintainability and usability.
2021-09-03 18:32:00 +03:00
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.
2021-09-07 00:49:40 +03:00
2022-02-09 05:58:07 +03:00
### Test the experimental version of dream2nix
There are different ways how dream2nix can be invoked (CLI, flake, In-tree, IFD). A simple way to try out dream2nix is to check out the repository of the software to package and drop this flake.nix inside it:
```nix
{
inputs.dream2nix.url = "github:nix-community/dream2nix";
outputs = { self, dream2nix }@inputs:
2022-02-09 05:58:07 +03:00
let
dream2nix = inputs.dream2nix.lib.init {
# modify according to your supported systems
systems = [ "x86_64-linux" ];
config.projectRoot = ./. ;
2022-02-09 05:58:07 +03:00
};
in dream2nix.makeFlakeOutputs {
source = ./.;
2022-02-09 05:58:07 +03:00
};
}
```
After adding the flake.nix, execute the following commands to list the packages which can be built:
```shell
git add ./flake.nix
nix flake show
```
### Watch the recent presentation
[![dream2nix - A generic framework for 2nix tools](https://gist.githubusercontent.com/DavHau/755fed3774e89c0b9b8953a0a25309fa/raw/3c8b2c56f5fca3bf5c343ffc179136eef39d4d6a/dream2nix-youtube-talk.png)](https://www.youtube.com/watch?v=jqCfHMvCsfQ)
### Further Reading
2021-09-29 20:27:49 +03:00
- [Summary of the core concepts and benefits](/docs/concepts-and-benefits.md)
- [How would this improve the packaging situation in nixpkgs](/docs/nixpkgs-improvements.md)
2021-11-07 10:48:53 +03:00
- [Override System](/docs/override-system.md)
2021-09-29 22:05:17 +03:00
- [Contributors Guide](/docs/contributors-guide.md)