Skip to content
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

Build phases (with mkDerivation) #603

Open
2 tasks
zmitchell opened this issue Jun 19, 2023 · 7 comments
Open
2 tasks

Build phases (with mkDerivation) #603

zmitchell opened this issue Jun 19, 2023 · 7 comments
Labels
tracking A stopgap for issue dependencies tutorial Topics for new tutorials

Comments

@zmitchell
Copy link
Contributor

Project description

A Nix build goes through several phases, many of which are handled for you automatically if you're using nixpkgs-provided builders. However, it's common to want to customize a particular build phase or write your own logic for a particular phase if you aren't using a builder. This tutorial should focus on common build phases, when each one occurs, and how you might customize each one to accomplish certain tasks. This tutorial could also show that builders implement these phases differently to accommodate their different use cases.

Steps

  • Submit a PR with an outline for the tutorial
  • Submit a PR with a draft of the tutorial

Considerations

This is a broad topic that can go in many different directions, so special attention should be given to making sure that this is a tutorial and not an explanation. In other words, the user should be working on a specific task that puts them in contact with these topics, this document shouldn't be a general discussion of phases.

@zmitchell zmitchell added tracking A stopgap for issue dependencies learning journey labels Jun 19, 2023
@zmitchell zmitchell mentioned this issue Jun 19, 2023
28 tasks
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-19-tutorial-series-call-for-feedback-1/29377/1

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-22-learning-journey-working-group-meeting-notes-14/29490/3

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-22-documentation-team-meeting-notes-57/29500/1

@zmitchell
Copy link
Contributor Author

A more specific direction for this tutorial would be to show how you use the phases to build up a simplified version of a particular builder as a means of showing how to leverage derivation phases to solve your own problems.

@roberth
Copy link
Member

roberth commented Jun 29, 2023

It would be nice to include postgresqlTestHook, which improves the default checkPhase.
(not essential, but I like to think that a cool feature like that could get someone excited about Nix)

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-06-29-documentation-team-meeting-notes-59/29848/1

@Michael-J-Ward
Copy link
Contributor

This was one of my personal learning outcomes from going through the nix-pills tutorial.

Would it be better to update that tutorial under new nix conventions - nix flakes and perhaps nix command equivalents?

@zmitchell zmitchell changed the title First steps tutorial - mkDerivation phases Learning Journey tutorial - mkDerivation phases Sep 19, 2023
@fricklerhandwerk fricklerhandwerk added the tutorial Topics for new tutorials label Feb 7, 2024
@fricklerhandwerk fricklerhandwerk changed the title Learning Journey tutorial - mkDerivation phases Build phases (with mkDerivation) Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking A stopgap for issue dependencies tutorial Topics for new tutorials
Projects
None yet
Development

No branches or pull requests

5 participants