Commit graph

68 commits

Author SHA1 Message Date
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 403420fd4b
fix: missing semicolon 2024-06-22 10:43:47 -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 69a8760bd3
feat: working linux-headers build 2024-06-22 09:11:32 -07:00
Steve D 8e9cb4fbe9 foundation/stage0: fix hex0 hashes for amd64 & arm64 (#2)
I must confess to not understanding quite how all this works, but this seems to solve the problem of aarch64 fetching the x86-64 binary and vice-versa.

Reviewed-on: #2
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Steve Dodd <steved424@gmail.com>
Co-committed-by: Steve Dodd <steved424@gmail.com>
2024-06-17 10:59:52 +00: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 6bd35bf4d5
feat: rich platform information 2024-06-15 04:18:05 -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 3713635d76
feat: simple builder 2024-06-14 07:01:18 -07:00
Jake Hamilton b3f9fe574e
refactor: enable foundation, standardize exports 2024-06-14 04:55:15 -07:00
Jake Hamilton fea8c2cd9c
feat: working package export 2024-06-14 04:47:54 -07:00
Jake Hamilton cdc90a4656
refactor: potluck -> tidepool 2024-06-14 02:12:19 -07:00
Jake Hamilton e1321add05
feat: dynamic cross packages generation 2024-06-14 01:40:46 -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 9c29945531
fix: use type name for tagged type 2024-06-12 22:03:49 -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 7f8cc9be92
docs: formatting tweaks for rich text 2024-06-12 06:20:13 -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 d9fe1ff418
Merge pull request #1 from matklad/patch-1 2024-06-08 08:46:26 -07:00
Alex Kladov ca75cfdc45
Minor docs typo 2024-06-08 16:44:53 +01:00
Jake Hamilton a7ab8dcf88
fix: add missing non-flake entry 2024-06-08 05:28:59 -07:00
Jake Hamilton 135bd39ef1
feat: make lib a dynamic arg 2024-06-08 05:23:33 -07:00
Jake Hamilton e015170e78
refactor: organization and typo fixes 2024-06-08 03:36:57 -07:00
Jake Hamilton 7e9ae0798d
docs: add mention of stage 2 2024-06-07 21:23:40 -07:00
Jake Hamilton 0c03ce790f
feat: heirloom, heirloom-devtools 2024-06-07 21:19:25 -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 bfe8d4e268
feat: stage 2 gcc, gnused, gnutar, gzip 2024-06-07 19:51:13 -07:00
Jake Hamilton 021d531470
feat: stage2 gnugrep, gnupatch, update naming 2024-06-07 19:22:57 -07:00
Jake Hamilton b2c019cf88
feat: stage 2 bash, binutils, bzip2, coreutils, diffutils, findutils, gawk, gnumake 2024-06-07 18:26:58 -07:00
Jake Hamilton d394492d9c
docs: add mention of stage 1 2024-06-07 05:35:45 -07:00
Jake Hamilton b55f9fc7db
feat: bzip2, gcc v8, gcc v13, gnutar 2024-06-07 05:32:10 -07:00
Jake Hamilton 760b190dd1
feat: gcc v4.6 cxx 2024-06-07 03:37:03 -07:00
Jake Hamilton 075c520b66
feat: bash, gcc v4.6 2024-06-07 02:58:05 -07:00
Jake Hamilton aa49ef8946
feat: coreutils, binutils, findutils, diffutils 2024-06-07 01:07:17 -07:00
Jake Hamilton 240b30723f
musl builds of gawk, gnumake, gnutar 2024-06-07 00:35:38 -07:00
Jake Hamilton dcbe11025b
feat: gawk-boot 2024-06-06 23:28:56 -07:00