Skip to content

Instantly share code, notes, and snippets.

@MarkDBlackwell
Forked from rlefevre/elm-0.19.1-i386.md
Last active April 28, 2020 19:49
Show Gist options
  • Save MarkDBlackwell/fa8a7e8f516e698880622b92c4c008b5 to your computer and use it in GitHub Desktop.
Save MarkDBlackwell/fa8a7e8f516e698880622b92c4c008b5 to your computer and use it in GitHub Desktop.
Elm 0.19.1 Linux 32bit unofficial binaries (Debian 10 Buster i386)

Unofficial Elm for Debian 10 Buster i386

Built with 32bit patches from https://github.com/dmy/elm-raspberry-pi.

Please do not report issues at the official Elm projects. You can comment here in the gist, note however that this is not a project that I intend to support in the future.

Install

curl -L https://gist.github.com/rlefevre/8fcf368d9951137e9e810c06c111bba1/raw/52c66eb0e01737e28f1f67f20790212b8ca6fd88/elm-i386-20200424.tar.gz | sudo tar zxC /usr/local/bin

The tarball includes the following binaries:

Compatibility

  • Built and tested on Docker x64 with Debian GNU/Linux 10 Buster i386 (32 bits).

Uninstall

$ sudo rm /usr/local/bin/elm{,-format,i-to-json}

Node.js

To use Elm tools like elm-test or elm-doc-preview, you will need Node.js.
The following command will install Node.js v10 and npm:

sudo apt-get update
sudo apt-get install nodejs npm
npm install -g npm@latest

Then logout/login.

It is advised to configure npm to store packages in a user directory.
Add to ~/.bashrc:

NPM_PACKAGES="$HOME/.npm-packages"
export PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH  # delete if you already modified MANPATH elsewhere in your configuration
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
unset NPM_PACKAGES

and run

npm config set prefix ~/.npm-packages

Then logout/login.

elm-test

You can install elm-test globally:

npm install -g elm-test --ignore-scripts

But it won't run without an elmi-to-json binary suitable for the platform, which is not available upstream. So we will make a link, in the expected location, to the one provided by this release:

$ (cd $(npm config get prefix)/lib/node_modules/elm-test/node_modules/elmi-to-json/bin; ln -fs /usr/local/bin/elmi-to-json)

Tests

# elm-test

elm-test 0.19.1-revision2
-------------------------

Running 1268 tests. To reproduce these results, run: elm-test --fuzz 100 --seed 365698587306260 /root/core/tests/tests/Main.elm /root/core/tests/tests/Test/Array.elm /root/core/tests/tests/Test/Basics.elm /root/core/tests/tests/Test/Bitwise.elm /root/core/tests/tests/Test/Char.elm /root/core/tests/tests/Test/CodeGen.elm /root/core/tests/tests/Test/Dict.elm /root/core/tests/tests/Test/Equality.elm /root/core/tests/tests/Test/List.elm /root/core/tests/tests/Test/Maybe.elm /root/core/tests/tests/Test/Result.elm /root/core/tests/tests/Test/Set.elm /root/core/tests/tests/Test/String.elm /root/core/tests/tests/Test/Tuple.elm


TEST RUN PASSED

Duration: 61718 ms
Passed:   1268
Failed:   0
This file has been truncated, but you can view the full file.
@rlefevre
Copy link

Thank you for the report and feedback.
The export commands don't hurt anyway, so I will let them.

@MarkDBlackwell
Copy link
Author

elm-doc-preview, which you mention tangentially, threw for me Error: Cannot find module './lib/elm-doc-server' until downgraded from 5.0.2 to npm install -g elm-doc-preview@5.0.1.

@rlefevre
Copy link

Oh thank you! I made a mistake when publishing the 5.0.2 version a few days ago.
5.0.3 should be good.

@MarkDBlackwell
Copy link
Author

5.0.3 worked fine.

@MarkDBlackwell
Copy link
Author

@rlefevre BTW, the slew of warnings I got from $(npm config get prefix) before upgrading npm is why I recommended silent logging. So now it's unnecessary.

@rlefevre
Copy link

@MarkDBlackwell yeah I know, that's why I have placed the upgrade before the npm install 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment