Skip to content

feat(core.buildCommand): buildCommand DAG option#339

Merged
BirdeeHub merged 2 commits intomainfrom
buildCommand
Mar 15, 2026
Merged

feat(core.buildCommand): buildCommand DAG option#339
BirdeeHub merged 2 commits intomainfrom
buildCommand

Conversation

@BirdeeHub
Copy link
Owner

@BirdeeHub BirdeeHub commented Mar 15, 2026

wrapperFunction and builderFunction were too similar.

It was the right decision to split up the resposibility of wrapping from
the rest of the logic, so they can be overridden separately, but it
could have been done much better.

What we want wrapperFunction to do, is be able to see config, and
provide a buildCommand string. They can already see the config. Why not
just let people give us strings, for builderFunction to run?

Added a buildCommand dag option.

Used it for wlib.modules.makeWrapper and wlib.modules.symlinkScript

This also gives a clear path for how to add helper modules which need to
run build commands without immediately using up all the available stdenv
hooks

wrapperFunction option still exists, however it is now declared by the
makeWrapper module, and can only return a build command string

builderFunction is now in charge of running its buildCommand argument,
which will always contain a build command string, as opposed to
processing a wrapper argument which usually but not always contains a
build command string. If you wish to pass other values to
builderFunction, you may declare it in an option, builderFunction can
see all of config still.

Also,

Added a constructFiles helper module, which is included in the default module.

wrapperFunction and builderFunction were too similar.

It was the right decision to split up the resposibility of wrapping from
the rest of the logic, so they can be overridden separately, but it
could have been done much better.

What we want wrapperFunction to do, is be able to see config, and
provide a buildCommand string. They can already see the config. Why not
just let people give us strings, for builderFunction to run?

Added a buildCommand dag option.

Used it for wlib.modules.makeWrapper and wlib.modules.symlinkScript

This also gives a clear path for how to add helper modules which need to
run build commands without immediately using up all the available stdenv
hooks

wrapperFunction option still exists, however it is now declared by the
makeWrapper module, and can only return a build command string

builderFunction is now in charge of running its `buildCommand` argument,
which will always contain a build command string, as opposed to
processing a wrapper argument which usually but not always contains a
build command string. If you wish to pass other values to
builderFunction, you may declare it in an option, builderFunction can
see all of config still.
@BirdeeHub BirdeeHub force-pushed the buildCommand branch 2 times, most recently from 42f6208 to 1e225f6 Compare March 15, 2026 01:49
@BirdeeHub BirdeeHub merged commit 575386b into main Mar 15, 2026
2 checks passed
@BirdeeHub BirdeeHub deleted the buildCommand branch March 15, 2026 02:04
BirdeeHub added a commit that referenced this pull request Mar 15, 2026
#339

updated some things. Did not update these descriptions.
BirdeeHub added a commit that referenced this pull request Mar 15, 2026
#339

updated some things. Did not update these descriptions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant