depot/third_party/nixpkgs/pkgs/development/compilers/elm
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00
..
packages Project import generated by Copybara. 2024-01-02 12:29:13 +01:00
default.nix Project import generated by Copybara. 2023-11-16 04:20:00 +00:00
fetchElmDeps.nix Project import generated by Copybara. 2020-04-24 19:36:52 -04:00
makeDotElm.nix Project import generated by Copybara. 2022-12-17 11:02:37 +01:00
README.md Project import generated by Copybara. 2020-04-24 19:36:52 -04:00
registry.dat Project import generated by Copybara. 2023-10-09 21:29:22 +02:00
update.sh Project import generated by Copybara. 2020-04-24 19:36:52 -04:00

To update Elm:

Modify revision in ./update.sh and run it

Notes about the build process:

The elm binary embeds a piece of pre-compiled elm code, used by 'elm reactor'. This means that the build process for 'elm' effectively executes 'elm make'. that in turn expects to retrieve the elm dependencies of that code (elm/core, etc.) from package.elm-lang.org, as well as a cached bit of metadata (versions.dat).

The makeDotElm function lets us retrieve these dependencies in the standard nix way. we have to copy them in (rather than symlink) and make them writable because the elm compiler writes other .dat files alongside the source code. versions.dat was produced during an impure build of this same code; the build complains that it can't update this cache, but continues past that warning.

Finally, we set ELM_HOME to point to these pre-fetched artifacts so that the default of ~/.elm isn't used.

More: https://blog.hercules-ci.com/elm/2019/01/03/elm2nix-0.1/