Last active
June 3, 2020 18:48
-
-
Save jhillyerd/df925d0d675ce13de006f9b002aeea1b to your computer and use it in GitHub Desktop.
create-elm-app + elm 0.19 on NixOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These instructions assume you are on https://nixos.org/channels/nixos-18.09 | |
# You will need $HOME/bin in your $PATH to use create-elm-app | |
# Create a empty nix profile | |
nix-env -S /nix/var/nix/profiles/per-user/$USER/elm19-app | |
# Install elm 0.19 | |
nix-env -iA nixos.elmPackages | |
# Keep global node packages in $HOME, will result in bin, lib and node_packages dirs | |
npm set prefix $HOME | |
# Update npm, install create-elm-app | |
npm i npm@latest -g | |
npm i create-elm-app -g | |
# Replace the wrappers with symlinks to system elm | |
cd ~/lib/node_modules/create-elm-app/node_modules/elm/bin | |
rm -f elm | |
ln -s (which elm) . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment