docs: add basic docs on Tidepool and its package sets #18
No reviewers
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: auxolotl/labs#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "KFearsoff/labs:push-wwltzsrwkyqz"
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?
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
seems like a reasonable start to me
@ -0,0 +9,4 @@to build all other basic Linux utilities, and are oftentransitive dependencies of higher-level packages.The goal of `foundation` is to build `glibc`. For this, awell, it builds a whole toolchain, notionally any piece of it could be thought of as the goal.... I think I'd probably say that gcc and glibc are the goals. you need both of them to run C code.
f6fc5d080fto5348d37e84Thank you for putting all of this together!!
@ -29,0 +32,4 @@To build a package, you can run the following command inside of the `tidepool` directory:```consolenix build -f . packages.foundation.bash.latestThe default platform set for each package shouldn't be considered stable, it is arbitrary. We should instead be pointing users to
<pkg>.packages.<build>.<host>.<target>for now until we have a friendlier interface for consumption.@ -29,0 +35,4 @@nix build -f . packages.foundation.bash.latest```If you want to use the flake calling convention, you would have to add `package` attribute:We should probably just specify
.packageall the time to avoid ambiguity.@ -29,0 +49,4 @@This attrpath sets up default platforms for you. You can also set platforms explicitly, with this syntax:```consolenix build .#packages.foundation.gcc.latest.packages.<build>.<host>.<target>.packageI think this is what we should be showing the user for building packages right now.
@ -29,0 +70,4 @@## DevelopmentTidepool is built with Aux's portable submodules. They function similarly to NixOS modules.They function similarly to normal submodules.
@ -29,0 +73,4 @@Tidepool is built with Aux's portable submodules. They function similarly to NixOS modules.Using the submodules, Tidepool provides a nice and easy-to-work-with API.Tidepool can be used with flakes or without them (using [npins](https://github.com/andir/npins)).Maybe we can reword this. Npins is one solution for fetching Tidepool, but there are others.
@ -29,0 +75,4 @@Tidepool can be used with flakes or without them (using [npins](https://github.com/andir/npins)).Tidepool exports an attribute set, which can be viewed using `nix repl`. Let's visualizeit using `nix flake show` and see what is there!We shouldn't mention
nix flake showhere, none of our stuff conforms to the flake schema and it can fail with an error in some cases.@ -29,0 +129,4 @@- `internal` - this is the internal attribute set. Currently, it only brings Tidepool'sdependencies into scope: more concretely, it exposes the `foundation` namespace froma confusingly-named [Foundation](https://git.auxolotl.org/auxolotl/foundation) repository,Perhaps we can remove "confusingly named"?
Well... I think it is confusingly named! Having a repo named Tidepool and also a package set named
tidepoolthat uses the Tidepool repo is plenty confusing.I think I'd prefer to say that it might be confusing (because I agree), but also clarify the difference: it's used to bring in packages from the "Foundation" package set (which is our early bootstrap), which is not the same as the
foundationnamespace inside "Tidepool" (which makes those early-bootstrap packages play nice within tidepool, notably by allowing cross-compilation).I think it would feel better than to say "it's confusing ! awkward silence ... good luck !" (obv hyperbole, but I hope I'm clear ^^)
@ -29,0 +131,4 @@dependencies into scope: more concretely, it exposes the `foundation` namespace froma confusingly-named [Foundation](https://git.auxolotl.org/auxolotl/foundation) repository,which does the bootstrap chain from a 357-byte file- `new` - this is a function that allows to create a new package set, independentRather than saying "independent from Tidepool", maybe we can say "a new empty package set".
@ -29,0 +149,4 @@tidepool.new module;```- `preferences` - this is an attribute set that lists your current preferences.Rather than "current preferences" let's say "preferences for the package set".
@ -0,0 +4,4 @@## Foundation`foundation` is a package set similar to Nixpkgs' `stdenv`.I don't think this is equivalent to stdenv. Stdenv does a lot of other things. Rather, this is a minimal set of packages made available for all platforms to begin building off of.
@ -0,0 +9,4 @@to build all other basic Linux utilities, and are oftentransitive dependencies of higher-level packages.The goal of `foundation` is to build a GNU C toolchain.Slight tweak, the goal is to provide a working GCC and associated tools so other packages can be built with them.
@ -0,0 +25,4 @@Neat!The bootstrap chain is based on [full-source](https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-building-from-source-all-the-way-down/)bootstrap, made possible with amazing work by Guix's people!Don't forget the work Emily Trau did bringing it to Nix.
@ -0,0 +33,4 @@To build stage1 (`i686-linux`), run:```consolenix build --system i686-linux .#packages.foundation.glibc.versions."2.38-stage1-passthrough".packageWe should be specifying the fully qualified build/host/target to get the right package for consistency.
@ -0,0 +57,4 @@It's worth discussing this in more depth, because it demonstrates a couple ofmore advanced features.`context` is a special option that announces information that is needed toContext is information that this package provides when it is used as a dependency. Builders and hooks may use that context as they wish.
@ -0,0 +60,4 @@`context` is a special option that announces information that is needed touse the package as a dependency. For example, to use a C dependency, youwould need to tell the compiler where to look for relevant headers by appendinga flag. The C dependency can have `context` defined which includes the necessaryWe probably don't want to lock this down just yet, context is going to change a fair bit.
I think we can have it there for the time being. Going further, I would like to split up this README into smaller pieces of relevant info, so when
contextchanges, it will be easy to edit information about it.I agree with KFears, I think we should still explain what
contextdoes right now.contextwill change, but in the meantime I suspect a few people will be curious about tidepool's architecture and this explanation is still valuable imo.It might be worth adding a note that, while all of tidepool is subject to change,
contextis for sure going to, so this information might not stay relevant very long.5348d37e84to6293761554Thanks for the work, it's looking good to me ! I just have essentially two points:
@ -29,0 +32,4 @@To build a package, you can run the following command inside of the `tidepool` directory:```consolenix build -f . packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.x86_64-linux.packageI think we should not default to the cli-v3 commands in docs. I get what I'm saying may be a hot take, but: it's still an experimental feature. There are strictly less people that can run this command instead of the one that is not experimental, hence why I think this should be:
nix-build -A packages.foundation.bash.latest.packages.x86_64-linux.x86_64-linux.x86_64-linux.package(I'll use that command for my other comments, but won't repeat that point)
PS: ofc we should use the flake syntax and experimental commands when talking about the flake specifically :P
@ -29,0 +46,4 @@The full command syntax looks like this:```consolenix build .#packages.<package set>.<package>.<version>.packages.<build>.<host>.<target>.packageI think we should use a nix-native syntax that is actually legal and can actually be used for this:
Especially given that
<stuff>is actual nix syntax.@ -29,0 +49,4 @@nix build .#packages.<package set>.<package>.<version>.packages.<build>.<host>.<target>.package```It allows you to specify many things! For example, you can specify the package version:The transition here is a bit quick imo, we should tell that above this,
versionis one of"latest"or"stable", and because it's an alias for an actual fixed version, it goes under${package}.${version}.But you can access actual fixed versions as below, like
"5.2.15-stage1"using${package}.versions.${version}.@ -29,0 +89,4 @@We can visualize it!```consolegit+file:///home/nixchad/Documents/Projects/labs?dir=tidepoolI don't like the subtle reference to "chad", that's a far-right meme that originated on 4chan. If we do show the output of
nixflake show, we should use the flakerefgit+https://git.auxolotl.org/auxolotl/labs?dir=tidepool, that won't leak anyone's home dir nor require us to invent weird pseudonyms :P@ -29,0 +108,4 @@│ ├───...│ └───zlib omitted (use '--all-systems' to show)└───preferences: unknown```This
nix flake showoutput is confusing imo. Because tidepool does not comply to flakes schema, it will either add thoseomitted (use '--all-systems' to show)or fail if you do give--all-system:So I'd actually just show a very generic tree that's not obviously coming from
nix flake show, also with a better ordering (imo):@ -0,0 +4,4 @@## Foundation`foundation` is a minimal package set to start building everything else.I think this will help clarify the difference.
Feedback addressed!
Thank you!!