Commit graph

141 commits

Author SHA1 Message Date
1c26dd089b
packages/readme: clarify roles of packages.foundation and packages.core 2026-01-04 17:05:23 -05:00
b226ca0968 builders.foundation.basic: Add strings and numbers as valid types for vars (#54)
I forgor 💀

Reviewed-on: #54
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Ross Smyth <snix@treefroog.com>
Co-committed-by: Ross Smyth <snix@treefroog.com>
2025-11-18 07:56:06 +00:00
a89f53e923 config.builders.foundation.basic: Format structedAttrs change 2025-11-06 19:14:20 -05:00
cb215e54a6 config.builders.foundation.basic: Add structuredAttrs exports from vars 2025-11-06 19:12:55 -05:00
93eeee8024 config.builders.foundation.basic: Add vars to the derivation type 2025-11-06 19:10:01 -05:00
2523a43663 builders.basic: Validate environment variable names 2025-11-06 23:54:33 +00:00
521674fc9f Revert "labs/basic: Validate environment variables"
This reverts commit cabbf2372a.
2025-11-06 23:54:33 +00:00
d23a1c8387 Fix UK spelling of 'lib.licences', lib uses US spelling (probably reasonable) 2025-11-06 22:53:35 +00:00
cabbf2372a labs/basic: Validate environment variables 2025-10-28 00:08:51 -04:00
551bbc60de gnutar: Make bootstrap bash reproducible by default 2025-10-28 02:25:31 +00:00
fde83f51b4 gnutar: Make reproducible by default 2025-10-28 02:25:31 +00:00
2d844f8302 foundation/basic: Also use structuredAttrs 2025-10-28 02:23:24 +00:00
0b7e7d1e52 foundation/basic: Set the phase for nom
https://github.com/maralorn/nix-output-monitor
1a9ba0d6fe/src/libutil/logging.cc (L441)

Co-authored-by: dawn <dawnofmidnight@duck.com>
2025-10-25 17:13:10 -04:00
57a4021ce9 fix: temporarily patch gcc bootstrap compilation failures (#41)
This option was causing some compilation faliures. I want to address the root cause being foundation libstdc++ being broken, but for now let's avoid broken builds.

Reviewed-on: #41
Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Co-committed-by: Victor Fuentes <vlinkz@snowflakeos.org>
2025-10-17 04:04:25 +00:00
e2f6de0b11 refactor: eval performant target (#40)
Using `.extend` function causes nix to not cache the evaluation of a package (`a.extend {} != a.extend {}` ). In effect this meant that every time we used
```
	          gcc-cross = packages.foundation.gcc.versions."13.2.0-stage2".extend {
            settings.target = config.platform.host;
          };
          binutils-cross = packages.foundation.binutils.versions."2.41-stage1".extend {
            settings.target = config.platform.host;
          };
```
we were performing full re-evaluations of binutils and gcc. To make this worse, since binutils and gcc depend on other binutils and gcc (sometimes with this `.extend`), the amount of evaluations would start to blow up.
Before this patch evaluating `packages.foundation.gcc.latest.packages.x86_64-linux.x86_64-linux.package` would evaluate `binutils` stage1 139 times, after this patch (and before target patch) it's 4.

Reviewed-on: #40
Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Co-committed-by: Victor Fuentes <vlinkz@snowflakeos.org>
2025-10-15 03:23:25 +00:00
76cd63f5fe docs: update build instructions and foundation (#38)
Reviewed-on: #38
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: KFears <kfearsoff@gmail.com>
Co-committed-by: KFears <kfearsoff@gmail.com>
2025-10-15 03:21:49 +00:00
cb654dbfd0 tidepool/readme: update links to foundation and lib (#37)
A friend was looking at tidepool, and was confused when these were deadlinks.

Reviewed-on: #37
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: dawnofmidnight <dawnofmidnight@duck.com>
Co-committed-by: dawnofmidnight <dawnofmidnight@duck.com>
2025-10-15 03:20:52 +00:00
a5b66548d3 gcc: add glibc to rpath (#36)
This way, the binaries glibc builds will actually get linked to our libc.so at runtime, instead of the system one.

Reviewed-on: #36
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Piper McCorkle <contact@piperswe.me>
Co-committed-by: Piper McCorkle <contact@piperswe.me>
2025-10-07 06:17:07 +00:00
be0d6bc0e1 refactor: remove target (#31)
WIP. Posting just to make sure people know this is something I'd like to do.

Context: https://matrix.to/#/!PvnunzXUk4Vm1CmKS4:auxolotl.org/$bOm6iaBpWbo-KRJgo7FUZdeFIv9StzRHxklbx7OQ23g?via=auxolotl.org&via=matrix.org&via=catgirl.cloud

Reasons:

1. Why should GCC inflict complication upon all of tidepool just because of its own architectural deficiencies?
2. Most other compilers are multi-target so it doesn't matter
2. Target is useless for 99.9% of packages and only leads to user confusion, especially since many compilers also call what would be host here "target".
3. Canadian-cross is not very well supported. GCC barely supports it, and is broken in many cases. Nixpkgs does not support it (regardless of what its API may imply) and no one has ever complained.

Plan:

1. Remove most target related things. No reason to have it.
2. Add configuration parameter on GCC that selects its target

What does this mean:

This basically moves target to be a GCC-specific artifact rather than an official parameter every package must endure the cognitive load of. This is because it is.  Nixpkgs plans on dumping target in the future as well because of this. Or at least making it an alias.

If you want to create a compiler with a different target, then override GCC to do so. No need to pervade all of tidepool just for GCC.

Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Reviewed-on: #31
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Ross Smyth <snix@treefroog.com>
Co-committed-by: Ross Smyth <snix@treefroog.com>
2025-10-07 03:46:52 +00:00
8174d3a494 fix lib.systems.validate.compatible (#35)
Use builtins and aux `lib.fp.id` instead of nixpkgs functions for `lib.systems.validate.compatible`.

Reviewed-on: #35
Reviewed-by: Ruby Iris Juric <ruby+auxolotl@srxl.me>
Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Co-committed-by: Victor Fuentes <vlinkz@snowflakeos.org>
2025-10-06 15:10:56 +00:00
7f61482c7f refactor: use ftpmirror.gnu.org for gnu packages (#26)
https://ftp.gnu.org is very, *very* slow. From the [GNU downloads page](https://www.gnu.org/prep/ftp.en.html):

> [...]please try to use one of the many mirrors of our site listed below: the mirrors will give you faster response. [...] You can use the generic URLs https://ftpmirror.gnu.org and http://ftpmirror.gnu.org to automatically choose a nearby and up-to-date mirror.

Indeed, in my experience the mirrors are much faster. I don't see a reason we shouldn't default to them personally, so I've changed the default here.

Also see: auxolotl/foundation#8

Reviewed-on: #26
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Ruby Iris Juric <ruby@srxl.me>
Co-committed-by: Ruby Iris Juric <ruby@srxl.me>
2025-10-04 21:53:41 +00:00
02a45110c9 docs: add basic docs on Tidepool and its package sets (#18)
This is very far from perfect, but it lays some groundwork to Tidepool
documentation. This follows my (very limited) understanding, and so is
very much incomplete and WIP. I would like some help with the concepts I
haven't quite understood <3

Reviewed-on: #18
Reviewed-by: Jake Hamilton <jake.hamilton@hey.com>
Co-authored-by: KFears <kfearsoff@gmail.com>
Co-committed-by: KFears <kfearsoff@gmail.com>
2025-10-04 20:15:48 +00:00
b67847e7eb fix: Correctly resolve packages from preferences.packages.version (#33)
Before this, a value that does not correspond to an attribute under a
package alias' `versions` would make it default to the latest as defined
by `lib.packages.getLatest`, which isn't a silver bullt: it choose
"bash5.2.15-bootstrap" for instance instead of stage1-passthrough (and I
don;t think we have an easy fix for that).

Given values like `"1.2.3"` makes little sense in
`config.preferences.packages.version` (because it's a package-set-wide
preference), this means it was hardly ever useful.

before:

```console
❯ nix eval -f tidepool --apply 't:
  t.extend {modules = [{config.preferences.packages.version = "latest";}];}
  |> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
  |> (p: p.version)'
"5.2.15-bootstrap"
❯ nix eval -f tidepool --apply 't:
  t.extend {modules = [{config.preferences.packages.version = "stable";}];}
  |> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
  |> (p: p.version)'
"5.2.15-bootstrap"
```

after:

```console
❯ nix eval -f tidepool --apply 't:
  t.extend {modules = [{config.preferences.packages.version = "latest";}];}
  |> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
  |> (p: p.version)'
"5.2.15-stage1-passthrough"
❯ nix eval -f tidepool --apply 't:
  t.extend {modules = [{config.preferences.packages.version = "stable";}];}
  |> (t: t.config.lib.packages.resolve t.config.packages.foundation.bash)
  |> (p: p.version)'
"5.2.15-bootstrap"
```

Co-authored-by: austreelis <git@swhaele.net>
Reviewed-on: #33
Reviewed-by: Ruby Iris Juric <ruby+auxolotl@srxl.me>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
2025-10-04 00:40:05 +00:00
45ac7bc494 npins/source.json version bumps (#29)
Untested, but should fix #28?

Reviewed-on: #29
Reviewed-by: Ruby Iris Juric <ruby+auxolotl@srxl.me>
Co-authored-by: Steve Dee <steved424@gmail.com>
Co-committed-by: Steve Dee <steved424@gmail.com>
2025-10-03 14:40:57 +00:00
8ffc63ae42 fix: package license causing hydra eval fails (#30)
Difference in license attrset schema between lib and tidepool caused eval fails, as in [here](https://hydra.aux-cache.dev/jobset/aux/tidepool#tabs-errors).

This PR changes tidepool's scheme to align it with lib:
```console
❯ nix eval -f tidepool packages.foundation.bash.latest.meta.license --json | jq
{
  "free": true,
  "fullName": "GNU General Public License v3.0 or later",
  "name": "gpl3Plus",
  "redistributable": true,
  "spdxId": "GPL-3.0-or-later",
  "url": "https://spdx.org/licenses/GPL-3.0-or-later.html"
}
```

I kinda liked the previous schema of tidepool, but it's a lower impact fix than bumping lib's major, and I think we want to think more about licenses in lib (e.g. it would probably make sense to move tidepool's license type there to avoid dupplicating the code for the default behavior).

Co-authored-by: austreelis <git@swhaele.net>
Reviewed-on: #30
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
2025-10-03 05:15:39 +00:00
9477da5166 refactor: fix cross compiling packages (#23)
A lot of misc fixes to foundation packages to better support cross compiling
- Reduce number of gcc stages
- Fix cross compile hooks for gcc, no overrides necessary in stage3 anymore
- Add hooks to zlib
- Fix compiliation for `i686-linux.i686-linux.i686-linux`
Depends on #20

Reviewed-on: #23
Co-authored-by: Victor Fuentes <vlinkz@snowflakeos.org>
Co-committed-by: Victor Fuentes <vlinkz@snowflakeos.org>
2025-10-03 03:59:40 +00:00
0ae450a116 feat: add lib.fetchurl function (#27)
See comment in `tidepool/src/lib/fetchurl.nix` for details on rationale.

I've made this a function in `lib` instead of defining this as a builder, since we don't have a great mechanism at the moment for specifying the source of a package as another package. We'll need to tackle this eventually, but given that this is a bit of a special case in that it's only intended to be used to fetch sources during bootstrap, I think it's fine to just have this be a function that returns a derivation, instead of being a full builder. Open to other opinions, though.

Reviewed-on: #27
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Ruby Iris Juric <ruby@srxl.me>
Co-committed-by: Ruby Iris Juric <ruby@srxl.me>
2025-10-01 05:20:06 +00:00
956d1447d1 fix: example aux packages eval (#25)
- add namespace for `aux.a`, `aux.b`, `aux.c`'s builder config
- break an infinite recursion of `aux.a`'s install phase depending on its own derivation's `outPath`

Co-authored-by: austreelis <git@swhaele.net>
Reviewed-on: #25
Reviewed-by: vlinkz <vlinkz@snowflakeos.org>
Co-authored-by: Austreelis <austreelis@noreply.git.auxolotl.org>
Co-committed-by: Austreelis <austreelis@noreply.git.auxolotl.org>
2025-10-01 01:25:51 +00:00
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 aa7b2cd4ca
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: #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: #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: #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