-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Learning Journey tutorial - making a derivation #599
Comments
@roberth assigned to you for feedback |
Discussed in LJWG meeting today: This is a strong mix of explanation and tutorial. Tutorials should try to teach a behavioral pattern, and here the target skill is creating a We may want to rename the tutorial to be specific to |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-06-29-learning-journey-working-group-meeting-notes-15/29799/1 |
In the description of #601, we have
If the purpose of this tutorial was to teach Using |
Agreed, we can revisit this later if we want. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-08-10-learning-journey-meeting-notes-21/31556/1 |
Project description
This tutorial covers making a derivation that builds a Rust crate with no dependencies. It starts with
runCommand
and shows the difficulties that you run into using this simple builder, then ends with showing howmkDerivation
takes care of these same issues for you. This should help users get a better understanding of whatmkDerivation
is useful for e.g. it should help users build a mental model of what is happening and what needs to happen in order to successfully build a package.Steps
Considerations
In the meeting where we discussed this tutorial we came up with this rough flow:
cargo new --bin example_project
Create a default.nix with a
Observe failure, explain it (source isn’t available)
Explain how
${}
imports paths into the store. Fails with not writable.Fails:
$out
emptyThen show how mkDerivation makes this easier:
The text was updated successfully, but these errors were encountered: