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

Warn about abusing FODs? #10

Open
tejing1 opened this issue Aug 21, 2022 · 1 comment
Open

Warn about abusing FODs? #10

tejing1 opened this issue Aug 21, 2022 · 1 comment

Comments

@tejing1
Copy link

tejing1 commented Aug 21, 2022

Somewhere in https://book.divnix.com/ch04-00-derivations.html#fixed-output-derivations-fods it should probably mention the dangers of doing complex things inside FODs, given that this is a common newbie trap.

Maybe something like:
You may be tempted to put your build process itself into a FOD, particularly if your build system expects network access, but this is generally a bad idea in practice, as it results in fragile hashes, which make the resultant derivation impossible to reproduce before long. FODs should really only be used for processes that can be reasonably expected to produce bit-for-bit identical results, even across updates of the involved software and expected changes in the responses to network requests. Downloading a url, for example.

@jonringer
Copy link
Collaborator

Agreed, I'll add another paragraph about the importance of the process needing to be highly reproducible.

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

No branches or pull requests

2 participants