Skip to content
Snippets Groups Projects
Commit 6891e15d authored by Florian Sesser's avatar Florian Sesser
Browse files

Add JP's description of how to update the materialized nix expressions

parent f4026254
No related branches found
No related tags found
1 merge request!96Fix metric names
This directory contains "materialized" Nix expressions for packaging PaymentServer on NixOS.
Thie directory contains "materialized" Nix expressions for packaging PaymentServer on NixOS.
Haskell.nix is capable of generating all of these expressions on the fly but at the cost of using roughly 500MB more memory.
Thus we take advantage of this "materialization" feature of Haskell.nix to make it possible to deploy this software on systems that are close to memory constrained.
The contents of this directory are automatically generated and need to be regenerated for certain kinds of dependency changes.
See <https://input-output-hk.github.io/haskell.nix/tutorials/materialization/>.
Here's what you do:
1. Hack hack hack. Maybe change something that affects the packaging.
2. Add checkMaterialization = true; below materialized = ... in nix/default.nix
3. Build it (eg run nix-build nix -A PaymentServer.components.exes.PaymentServer-exe)
4. Whether the build succeeds or fails, you can throw away the checkMaterialization = ... line now.
5. If the build succeeds, the current materialization is up-to-date and you're done. If the build fails, it should do so with a line like "Materialized nix used for haskell-project-stack-to-nix-pkgs incorrect. To fix run: /nix/store/XXXXXX-updateMaterialized". Run the script it mentions. It will update the materialization in your working tree. This includes erasing the README I put there so maybe that README should be moved somewhere else. For now, check in the rest of the materialization changes and you're done.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment