3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/compilers/elm
Marek Fajkus 26b74d2938
elmPackages: fix nodejs packages
Fixes regression caused by
    4c60ee3da1 (pull: #142915)
    following patch of nodePackages using nodejs-14_x
    2c3b3e69ad (pull: #149120)

    - clenups and updates in generate-node-packages.sh
    - specify nodejs version in default.nix

    This makes elmPackages.* build with nodejs-14
    which resolves the issue with npm installation failing
2021-12-30 19:05:19 +01:00
..
packages elmPackages: fix nodejs packages 2021-12-30 19:05:19 +01:00
default.nix elmPackages: fix nodejs packages 2021-12-30 19:05:19 +01:00
fetchElmDeps.nix
makeDotElm.nix
README.md
registry.dat
update.sh

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/