feat: cc builder #22

Open
vlinkz wants to merge 1 commit from vlinkz/labs:vlinkz/ccbuilder into main
Owner

Basic gcc builder. Not yet fully featured, but enough to start.
Picked out of #21, example usage: 3e80b2e12e/tidepool/src/packages/core/hello/versions/2.12.nix.

Basic gcc builder. Not yet fully featured, but enough to start. Picked out of https://git.auxolotl.org/auxolotl/labs/pulls/21, example usage: https://git.auxolotl.org/auxolotl/labs/src/commit/3e80b2e12ee8f7f8cb3802ef394b0c2e615393bd/tidepool/src/packages/core/hello/versions/2.12.nix.
vlinkz added 1 commit 2025-09-20 04:15:48 +00:00
vlinkz force-pushed vlinkz/ccbuilder from 974dbc4b85 to 139750a59e 2025-09-20 04:39:51 +00:00 Compare
vlinkz force-pushed vlinkz/ccbuilder from 139750a59e to dc8f97c133 2025-09-20 04:41:54 +00:00 Compare
RossSmyth reviewed 2025-10-02 19:28:11 +00:00
@ -0,0 +85,4 @@
configureFlags = builtins.concatStringsSep " " (
lib.lists.when (settings.configure.prefix) [ "--prefix=$out" ]
++
lib.lists.when (settings.configure.platforms && package.platform.build != package.platform.host)
Contributor

Is there a reason why this shouldn't just be passed by default?

Is there a reason why this shouldn't just be passed by default?
First-time contributor

I think it's useful to disable these args if the configure script is cmake instead, which does not support this form of arguments. But I'm not sure whether this specific builder would be the preferred way of working with CMake.

I think it's useful to disable these args if the configure script is `cmake` instead, which does not support this form of arguments. But I'm not sure whether this specific builder would be the preferred way of working with CMake.
Contributor

These flags definitely should not be passed to CMake, should have its own attribute because the way it handles things are very different with types and such.

These flags definitely should not be passed to CMake, should have its own attribute because the way it handles things are very different with types and such.
Author
Owner

I was thinking we make seperate capabilities for cmake, meson, autotools, etc. Thoughts?

I was thinking we make seperate capabilities for cmake, meson, autotools, etc. Thoughts?
@ -0,0 +93,4 @@
++
lib.lists.when (settings.configure.platforms && package.platform.host != package.platform.target)
[
"--target=${(lib.systems.withBuildInfo package.platform.target).triple}"
Contributor

Same with this.

Same with this.
@ -0,0 +95,4 @@
[
"--target=${(lib.systems.withBuildInfo package.platform.target).triple}"
]
++ settings.configure.flags
Contributor

There are some other flags to be pass if it is an autotools-compatible configure script. Should we assume that? Examples:

  1. --disable-static (and ----enable-static for a static platform)
  2. --disable-dependency-tracking
  3. For GCC will need to handle --prefix
There are some other flags to be pass if it is an autotools-compatible configure script. Should we assume that? Examples: 1. `--disable-static` (and `----enable-static` for a static platform) 2. --disable-dependency-tracking 3. For GCC will need to handle `--prefix`
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u vlinkz/ccbuilder:vlinkz-vlinkz/ccbuilder
git checkout vlinkz-vlinkz/ccbuilder

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff vlinkz-vlinkz/ccbuilder
git checkout vlinkz-vlinkz/ccbuilder
git rebase main
git checkout main
git merge --ff-only vlinkz-vlinkz/ccbuilder
git checkout vlinkz-vlinkz/ccbuilder
git rebase main
git checkout main
git merge --no-ff vlinkz-vlinkz/ccbuilder
git checkout main
git merge --squash vlinkz-vlinkz/ccbuilder
git checkout main
git merge --ff-only vlinkz-vlinkz/ccbuilder
git checkout main
git merge vlinkz-vlinkz/ccbuilder
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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#22
No description provided.