refactor: default host and target platforms based on build #20

Merged
vlinkz merged 1 commit from vlinkz/labs:vlinkz/defaultplatforms into main 2025-09-23 03:29:56 +00:00
Owner

Following up on #15, this PR defaults host to @build and target to @host.
For regular packages, this means they only need to specify a

    platforms.build = "@linux";

which signifies support for all native linux and cross compiling from *-linux to *-linux.

Following up on https://git.auxolotl.org/auxolotl/labs/pulls/15, this PR defaults `host` to `@build` and `target` to `@host`. For regular packages, this means they only need to specify a ``` platforms.build = "@linux"; ``` which signifies support for all native linux and cross compiling from `*-linux` to `*-linux`.
vlinkz added 1 commit 2025-09-14 19:44:30 +00:00
vlinkz force-pushed vlinkz/defaultplatforms from 5d5596139d to 908efdf980 2025-09-14 19:51:42 +00:00 Compare
jakehamilton reviewed 2025-09-14 20:34:25 +00:00
@ -708,1 +710,3 @@
initial = builtins.head config.platforms;
initial =
if
builtins.any (
Owner

I don't think we should special case x86_64 here. We can just let the default be any one of the platform combinations.

I don't think we should special case x86_64 here. We can just let the default be any one of the platform combinations.
vlinkz marked this conversation as resolved
jakehamilton reviewed 2025-09-14 20:36:25 +00:00
@ -324,11 +324,13 @@ in
host = lib.options.create {
description = "The host platform for the package.";
type = lib.types.string;
default.value = "@build";
Owner

Thoughts on also adding the default "@all" for the build platform?

Thoughts on also adding the default "@all" for the build platform?
Author
Owner

Added @all, although maybe @linux might make more sense (at least for now)?

Added `@all`, although maybe `@linux` might make more sense (at least for now)?
vlinkz marked this conversation as resolved
vlinkz force-pushed vlinkz/defaultplatforms from 908efdf980 to 0a347e7ed1 2025-09-14 20:57:39 +00:00 Compare
vlinkz force-pushed vlinkz/defaultplatforms from 0a347e7ed1 to b17d3ca06f 2025-09-14 21:02:07 +00:00 Compare
vlinkz force-pushed vlinkz/defaultplatforms from b17d3ca06f to ab85ed8550 2025-09-20 04:03:19 +00:00 Compare
vlinkz merged commit ab85ed8550 into main 2025-09-23 03:29:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: auxolotl/labs#20
No description provided.