first "trivial" builders #10
Labels
No labels
Compat
Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: auxolotl/labs#10
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think equivalents to
nixpkgs.writeText
andnixpkgs.buildEnv
could be added to eitherfoundation
ortidepool
(or a new experiment if deemed better). This would enable mudenv to avoid relying on nixpkgs for such basic tools (the only dependencies should bebash
andcoreutils
), and it would already unlock some other uses (like dotfiles management).I can work on a pr once the details are figured out, mainly:
writeTextFile
,runCommand
(with optionalcc
),concatTextFile
,symlinkJoin
.I guess it depends on whether or not we want something like nixpkgs lib or if we just want all of the pkg builders in the normal pkg set. I personally don't lean one way or the other.
Though thinking about it. I think we have a basic builder in tidepool already, so it should probably go alongside that.
As for the rest of the points:
Yes and yes. If they should be a builder like tidepool's basic, should text scripts be packages too ? This means that config options for widely different builders may need to be shared:
I'm not sure what kind of error happens (if any) in case the builder is mistakenly set to
builders.basic
for something that was supposed to be a text script, or vice-versa, but I'm not sure I'm a fan of this extremely loose coupling between builders and package definitions.Ideally I'd want something like:
That kind of challenges the whole "builders" design in tidepool, and that's not the point of that issue, so it may be ok to just add a builder, some package options, and think about the grand scheme of tidepool's design later.
TL;DR: Should trivial builders just piggyback on the existing package submodule and "just be another builder", or be an entire separate business in order to have a potentially cleaner API.
I agree. I think that I'd start with just
writeTextFile
(from which all thewrite{Shell,}{Text,Script,}{File,Dir,}
can be derived),runCommand
(with optionalcc
),concatTextFile
(from which all others can be derived) andsymlinkJoin
(which is really just thebuildEnv
primitive and could be extended later).I'd prefer to focus on getting basic but extensible building blocks.
100% in agreement, the ones I listed are fairly easy to implement being extensions and could likely be done all in one go but your set makes more sense for a starting point.
I'm of the mind it should be separate. Having config level categories would be quite nice. Your
.textFiles
is a good example, to go along with that we'd probably also want.commands
and.envs