Austreelis
4b9b9c3506
format code
2024-06-22 20:44:33 +02:00
Austreelis
5098f7789b
Add test checking mixed module/include keys
2024-06-22 20:43:27 +02:00
Austreelis
feb9987300
Use include object syntax instead of shorthand
2024-06-22 20:43:24 +02:00
Austreelis
71bc768dc1
Code cleanup and readability
2024-06-22 20:40:02 +02:00
Austreelis
a6ad4027a1
feat: namespaced includes
...
This commit adds some logic to the modules normalization process to
allow including modules under a user-defined namespace. It achieves it
by:
- flattening any attribute sets in `includes` that are non-empty nor
contain any of a module's valid attributes (`lib.modules.VALID_KEYS`).
- Erroring out on dupplicate namespaces.
- Mapping namespaced includes do normal modules declaring an option
`${namespace}` of the include as a submodule.
This allows specifying includes in a module like:
```
{
includes.mynamespace0 = ./mymodule0.nix;
includes.mynamespace1 = ./mymodule1.nix;
}
```
and is approximatively desugared by `lib.modules.normalize` into:
```
{
includes = [
{ options.mynamespace0 = lib.submodule mymodule0.nix; }
{ options.mynamespace1 = lib.submodule mymodule1.nix; }
];
}
```
This was inspired by nixpkgs' `lib.modules.doRename`.
2024-06-22 20:39:08 +02:00
Jake Hamilton
a707b0f06b
refactor: format all nix code
2024-06-22 10:58:44 -07:00
Jake Hamilton
3479354ec9
refactor: add formatting script
2024-06-22 10:56:18 -07:00
Jake Hamilton
9316874396
fix: add missing prefix for submodules, incorrect var name
2024-06-22 09:11:33 -07:00
Jake Hamilton
dc2ce818b8
feat: apply dag defaults
2024-06-22 09:11:32 -07:00
Jake Hamilton
9850da8aa9
fix: resolve issue with extending cross package
2024-06-16 02:24:21 -07:00
Jake Hamilton
0312e3c4cc
feat: working gcc build
2024-06-15 07:08:45 -07:00
Jake Hamilton
1c67c40213
feat: cross compilation package set
2024-06-15 03:58:25 -07:00
Jake Hamilton
2989fdc4fe
refactor: more elegant shorthand support
2024-06-15 02:35:37 -07:00
Jake Hamilton
aa1c58f6ee
feat: support submodule longhand
2024-06-14 17:26:58 -07:00
Jake Hamilton
fea8c2cd9c
feat: working package export
2024-06-14 04:47:54 -07:00
Jake Hamilton
ea0ed58a7e
feat: working module packages
2024-06-14 01:26:16 -07:00
Jake Hamilton
856b88321e
fix: correct broken submodules
2024-06-13 10:22:57 -07:00
Jake Hamilton
f9ce7ff68b
feat: system info
2024-06-12 22:00:03 -07:00
Jake Hamilton
cd12786be1
docs: update source urls
2024-06-12 06:31:09 -07:00
Jake Hamilton
04bc516868
feat: dag, internal inputs solution, license update
2024-06-12 02:04:53 -07:00
Jake Hamilton
f24f0876a9
feat: customizable gnu mirror, remove inputs for monorepo, potluck base
2024-06-11 04:39:26 -07:00
Jake Hamilton
284b8de0d5
refactor: types.package renamed to types.derivation, add lib extend
2024-06-09 06:28:32 -07:00
Jake Hamilton
135bd39ef1
feat: make lib a dynamic arg
2024-06-08 05:23:33 -07:00
Jake Hamilton
64985d6058
feat: bison, gnum4, linux-headers, zlib, python, busybox, glibc, patchelf
2024-06-07 20:53:54 -07:00
Jake Hamilton
3a6d4526a6
feat: tinycc-musl
2024-06-06 23:14:11 -07:00
Jake Hamilton
84633e1eb8
feat: add nyacc
2024-06-05 04:32:04 -07:00
Jake Hamilton
1642b2173b
refactor: code cleanup, move sources to separate module
2024-06-05 04:10:35 -07:00
Jake Hamilton
3fe60580da
feat: add foundation
2024-06-04 19:04:40 -07:00
Jake Hamilton
39ea93b671
docs: add missing documentation
2024-06-03 17:03:28 -07:00
Jake Hamilton
f7d6c846f6
chore: initial commit
2024-06-03 03:03:54 -07:00
Jake Hamilton
b7456195bd
feat(lib): withDynamicArgs, add basic module system tests
2024-06-02 01:01:38 -07:00
Jake Hamilton
0409563e32
chore: initial commit
2024-06-01 04:00:53 -07:00