1# To update Elm:
2
3Modify revision in ./update.sh and run it
4
5# Notes about the build process:
6
7The elm binary embeds a piece of pre-compiled elm code, used by 'elm
8reactor'. This means that the build process for 'elm' effectively
9executes 'elm make'. that in turn expects to retrieve the elm
10dependencies of that code (elm/core, etc.) from
11package.elm-lang.org, as well as a cached bit of metadata
12(versions.dat).
13
14The makeDotElm function lets us retrieve these dependencies in the
15standard nix way. we have to copy them in (rather than symlink) and
16make them writable because the elm compiler writes other .dat files
17alongside the source code. versions.dat was produced during an
18impure build of this same code; the build complains that it can't
19update this cache, but continues past that warning.
20
21Finally, we set ELM_HOME to point to these pre-fetched artifacts so
22that the default of ~/.elm isn't used.
23
24More: https://blog.hercules-ci.com/elm/2019/01/03/elm2nix-0.1/