Commit graph

113 commits

Author SHA1 Message Date
ab85ed8550
refactor: default host and target platforms based on build 2025-09-19 21:03:13 -07:00
1f7ae040bc
feat: add package settings 2025-09-14 09:39:57 -07:00
9fb80e319d
chore: format 2025-09-14 09:36:55 -07:00
dbd936d32f
refactor: remove unused code 2025-09-14 09:35:05 -07:00
6854e9ccac
refactor: namespace builders 2025-09-14 09:27:13 -07:00
f4f1f0aea7
feat: build contexts for build, host, and target 2025-09-14 01:36:33 -07:00
9ae15ed2ff
Squashed commit of the following:
commit aa7b2cd4ca74bec7ad004e97c21e38a84e91e0c3
Author: Jake Hamilton <jake.hamilton@hey.com>
Date:   Wed Sep 10 08:42:05 2025 -0700

    refactor: use platform specs
2025-09-11 06:17:07 -07:00
9cc8f06638
refactor: do not include basic builder in new package sets 2025-09-11 06:16:26 -07:00
a7df517df8
chore: upgrade tidepool to iteration phase 2025-09-10 08:53:32 -07:00
2f31813c88 feat: add support for platform specs (#15)
This PR adds a new way of declaring supported platforms for packages. Previously individual build, host, and target values needed to be set for a given platform combination. Now, a platform spec can be written to generate many platform combinations.

This allows for easy mapping of all possible systems with `@all`, linux systems with `@linux` or any other available alias of `lib.systems.doubles.<alias>` by using `@<alias>`. In addition, you can use `@build` and `@host` to lock either the host or target respectively to match the prior platform.

Reviewed-on: auxolotl/labs#15
2025-09-10 12:32:11 +00:00
4e4b9366a4 feat: dynamic cross compiler (#14)
This pr adds initial support for creating a cross-compile tool chain for arbitrary architectures. For now only `aarch64`  and `riscv64` are implemented, but simlpy adding another architecture to the list of supported platforms in each package should mostly work with minimal patches.
In order to build native gcc for aarch64, you can run
```
nix-build --expr '((import ./tidepool).packages.foundation.gcc.versions."13.2.0-stage4".package.extend { platform = { build = "aarch64-linux"; host = "aarch64-linux"; target = "aarch64-linux"; }; }).package'
```
or
```
nix-build tidepool -A packages.foundation.gcc.latest.packages.aarch64-linux.aarch64-linux.aarch64-linux
```
Running this command:
- Uses [foundation](https://git.auxolotl.org/auxolotl/foundation) to bootstrap i686 gcc
- Incrementally bootstraps x86_64 gcc from i686
- Runs through the same incremental process, but this time using x86_64 gcc we previously built to bootstrap aarch64
- Build the final native aarch64 gcc

Co-authored-by: Jake Hamilton <jake.hamilton@hey.com>
Reviewed-on: auxolotl/labs#14
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Co-committed-by: Victor Fuentes <vlinkz@snowflakeos.org>
2025-09-08 20:08:35 +00:00
913b94f06a Fix: permission denied when fetching repo via npins (#17)
people were denied permission to clone aux repos to their store when building
from source if they didn't have an account with a correct local ssh setup.

Co-authored-by: austreelis <git@swhaele.net>
Reviewed-on: auxolotl/labs#17
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
2025-09-03 14:23:19 +00:00
2c19b9ff12
refactor: enable system build info assertions 2025-08-31 18:44:45 -07:00
5d8dc6e478
refactor: allow src to be an attribute set of sources 2025-08-31 01:48:01 -07:00
1ae64357af
refactor: make builders portable and extendable, make creating new package sets easy 2025-08-31 01:34:49 -07:00
01db12d713
refactor: stable reference package platforms to improve eval time 2025-08-30 22:36:20 -07:00
5a222fa399
feat: working native x86_64-linux gcc 2025-08-29 12:32:37 -07:00
8b9b072d56
wip: working gcc stage1, stage2, stage3 2025-08-28 04:06:51 -07:00
8fe3a90993
wip: (broken gcc) add additional foundation packages 2025-08-26 04:55:10 -07:00
c393a33a1d
feat: passthrough foundation 2025-08-25 01:37:11 -07:00
1d8f94fabe
feat: working aux package builds, auto-naming 2025-08-23 20:33:46 -07:00
85e3fea0d4
chore(foundation): remove foundation from labs 2025-03-30 06:55:20 -07:00
5bec48ef8a
chore(lib): remove lib from labs 2025-03-30 04:24:37 -07:00
c30f94972c
fix: support name arg in portable submodules 2025-03-23 20:04:39 -07:00
5fc4fd1b5c
refactor: rename getSubModules to submodules for types
BREAKING: The previous implementation was created with the assumption
that this submodules property would be a function in some cases. As it
turns out this was not necessary and the name became confusing as
"getSubModules" does not read as "this is a list" to the user. It has
been renamed to "submodules" instead.
2025-03-11 22:49:24 -07:00
397419d8ab
chore: format code 2025-03-11 22:47:02 -07:00
a17ac0ff2b
feat: add portable submodule type 2025-03-07 22:28:41 -08:00
6093067c50
fix: use default value for missing file 2025-03-07 22:28:30 -08:00
f69e9b8c78
fix: cast int to string 2025-03-07 20:45:34 -08:00
866b8902c9 fix(lib): swapped entries in test dag.sort.topological."sorts a graph" (#9)
I figure it's a simple typo. This test expects entries `"a"`, `"b"`, `"c"`, `"d"` to be lexicographically sorted but fails. The actual result is that entries are sorted in this order: `c, b, a, d`. This is because the test adds the entry `"b" = lib.dag.entry.between [ "c" ] [ "a" ] "b"`, i.e. after `"c"` and before `"a"`. I haven't checked if it was a logic error in the sort implementation, as other pieces of labs rely on it (and use `lib.dag.entry.between` with the arguments flipped relative to the test, which makes sense), and the arguments of the function `lib.dag.entry.between` are named "after", *then* "before".

Co-authored-by: Austreelis <dev.austreelis@swhaele.net>
Reviewed-on: auxolotl/labs#9
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
2024-10-08 18:44:31 +00:00
d7762a5a78 add bootstraped x86_64-linux cross compiled gcc (#8)
Work in progress cross compiler for x86_64. I've managed to get a full x86_64 gcc using the binaries built from foundation, and am working on implementing their builds into tidepool.

### Bootstrapping steps
0) Start with i686 tools (gcc, binutils, musl, etc)
1) Build binutils targeting x86_64-linux
2) Build a minimal gcc cross compiler using the cross binutils. This minimal cross compiler does not have support for libc, so is pretty much only useful for building musl or glibc.
3) Use the minimal cross compiler to build x86_64-linux glibc or musl
4) Now that we have a cross compiler and x86_64-linux libc, we can build gcc for the target architecture!
5) Profit! We can now build anything x86_64 using our gcc compiler!

Co-authored-by: Jake Hamilton <jake.hamilton@hey.com>
Reviewed-on: auxolotl/labs#8
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Victor Fuentes <vmfuentes64@gmail.com>
Co-committed-by: Victor Fuentes <vmfuentes64@gmail.com>
2024-09-22 02:55:02 +00:00
cadfaabc85 "Fix lib.types.derivations.shell's check" (#7)
"`lib.types.derivations.shell` uses `lib.packages.isDerivation` but didn't passed an argument, making code using it fail with `error: value is a function while a Boolean was expected`"

Co-authored-by: Austreelis <dev@austreelis.net>
Reviewed-on: auxolotl/labs#7
Reviewed-by: isabel roses <isabel@isabelroses.com>
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
2024-08-15 16:06:20 +00:00
7d94b7f665
feat: package extend, dynamic propagation 2024-07-09 02:54:33 -07:00
3f9d287065
refactor: format 2024-07-09 01:49:44 -07:00
ea200d834e
feat: pass through package dependencies via context 2024-07-08 23:18:11 -07:00
62bc2f4eee
feat: propagating hooks and context 2024-07-08 23:07:59 -07:00
42e69f7d43 "topographic" -> "topological" in latest tidepool commit (#6)
Reviewed-on: auxolotl/labs#6
Co-authored-by: Steve Dodd <steved424@gmail.com>
Co-committed-by: Steve Dodd <steved424@gmail.com>
2024-07-08 19:19:49 +00:00
0ad14e8795
refactor: make dag helpers easier to reason about 2024-07-07 15:10:37 -07:00
0a63667459
refactor(format): apply formatting 2024-07-07 15:03:48 -07:00
d2b053d63a
feat: export linux-headers 2024-07-07 15:03:47 -07:00
7774f65079
refactor: minor cleanup 2024-07-07 15:03:46 -07:00
fd9b85f29e
feat: apply platform to deps inside submodules 2024-07-07 15:03:45 -07:00
b315ae81f6
refactor: only support i686-linux for foundation gcc 2024-07-07 15:03:45 -07:00
193a52cbc8
fix: cross-platform deps 2024-07-07 15:03:44 -07:00
27a0e3d59f
fix: remove failing build args 2024-07-07 15:03:43 -07:00
2b5f90d4e5
refactor: make dependencies dynamically built per-package 2024-07-07 15:03:42 -07:00
008632bc8b
feat: working transient deps 2024-07-07 15:03:41 -07:00
0f602b1cb7
wip: working single dependency reference via coercion 2024-07-07 15:03:38 -07:00
8233d4aedf use correct name for topological sort (#5)
I am 0.8 sure this is a typo, I've never seen this being referred to as topographic sorting!

Reviewed-on: auxolotl/labs#5
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: Alex Kladov <aleksey.kladov@gmail.com>
Co-committed-by: Alex Kladov <aleksey.kladov@gmail.com>
2024-06-23 18:39:30 +00:00
a2f0a06426 Fix non-deterministic "missing: Permission denied" errors (#4)
Make 'missing' executable where source tarballs use autotools and are unpacked with untar.  untar doesn't preserve or set mtime, which may result in autotools generated files, e.g. configure, having newer timestamps than their source files (e.g. configure.in.) In these circumstances autotools generated Makefiles will call 'missing' to either regenerate them or fix-up the timestamps.

Reviewed-on: auxolotl/labs#4
Reviewed-by: isabel roses <isabel@isabelroses.com>
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-23 17:32:11 +00:00