termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.02k stars 2.99k forks source link

Package request: Elixir #392

Closed alanmaciel closed 5 years ago

alanmaciel commented 8 years ago

Elixir is a dynamic, functional language designed for building scalable and maintainable applications.

Elixir leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain.

http://elixir-lang.org

aurerua commented 8 years ago

+1 With the growing attention that Elixir and Phoenix are getting, this would be awesome!

bugQ commented 8 years ago

+1 originally found termux wanting a way to do http://exercism.io problems on the go and learn new languages

janjitsu commented 7 years ago

+1

cdarne commented 7 years ago

I've been able to run an Elixir project by building the erlang package from that PR https://github.com/termux/termux-packages/pull/439 and by downloading the latest precompiled Elixir package.

gnagno commented 7 years ago

+1

charlenopires commented 7 years ago

+1

fornwall commented 7 years ago

Thanks to @remvee an erlang package is now available. Install with:

apt update && apt install erlang
magoun commented 7 years ago

@bugQ Were you able to get exercism running on Termux? I've gotten it installed (along with elixir, using the precompiled method mentioned in a previous comment), but I cannot fetch exercises - I keep getting a connection refused error. Based on some research, it looks like this may be a problem with installing exercism outside of the package manager inside Termux... not sure. Curious if you were able to get it running!

UPDATE: I was able to get exercism functioning. TL;DR - Install golang, use go to build the Exercism binary from its GitHub repo inside Termux. I am completely unfamiliar with go and was able to do this in about 5 minutes!

onlurking commented 6 years ago

I've manage to get Elixir up and running some time ago using the Precompiled:

mkdir "$HOME/.elixir" && cd "$HOME/.elixir"
curl -L https://github.com/elixir-lang/elixir/releases/download/v1.6.2/Precompiled.zip 2>/dev/null >Precompiled.zip
unzip -qq Precompiled.zip 1>/dev/null && rm Precompiled.zip && cd bin
termux-fix-shebang elixir elixirc iex mix
echo 'export PATH="$PATH:$HOME/.elixir/bin"' >>"$HOME/.profile"
cd "$HOME"

I even made a installer with my dotfiles, for a straightforward installation: curl -fsSL https://git.io/termux | bash -s -- --zsh --elixir

SDRausty commented 6 years ago

Elixir is available today on device through Arch Linux in Termux PRoot:

$ pacman -Ss Erlang
community/ejabberd 18.01-1
    Jabber server written in Erlang
community/elixir 1.6.2-1
    a functional meta-programming aware language built on top of the Erlang VM
community/erlang 20.2-1
    General-purpose concurrent functional programming language developed by Ericsson
community/erlang-cl 1.2.1-4
    OpenCL binding for Erlang
community/erlang-docs 20.2-1
    HTML and PDF documentation for Erlang
community/erlang-nox 20.2-1
    General-purpose concurrent functional programming language developed by Ericsson
    (headless version)
community/erlang-sdl 1.3.1-2
    SDL and OpenGL bindings for Erlang
community/erlang-unixodbc 20.2-1
    Unixodbc support for Erlang
community/rabbitmq 3.7.3-2
    Highly reliable and performant enterprise messaging implementation of AMQP written in
    Erlang/OTP
community/rebar 1:2.6.4-1
    A sophisticated build-tool for Erlang projects that follows OTP principles.
community/yaws 2.0.4-3
    Web server/framework written in Erlang

More information at https://sdrausty.github.io/TermuxArch/ 🎼🎶

onlurking commented 6 years ago

@sdrausty, sorry, but could you stop flooding all termux issues with your project?

I mean, you are one of the most helpful and active persons on this repo(specially regarding the issues trying to use the SD Card as an storage extension), but you always post a huge wall-text(which is the pacman search result) and sometimes this get in the way of the discussion. :/

SDRausty commented 6 years ago

@onlurking thanks for the input. The goal is simple, from obscurity into the spotlight. "Oh, I didn't know," nevermore!

  1. Screenshot promotional was discontinued for Arch Linux in Termux PRoot - user input; on slow connections, it's easy to see.

Synopsis, your comments are taken into account.

your project

One of our numerous Termux projects, join this small group of https://sdrausty.github.io/TermuxArch/CONTRIBUTORS if you like. The huge textwall really hits home with:

$ pacman -Ss |wc -l                                                         
16838

How many packages is this? How many programs? How many package managers?

pacman -Ss |grep manager|grep package|wc -l                               
9

On an important side note for Termux packages that already run on device: Some of these Arch Linux packages work better than their Termux counterparts. Why?

At times, there are a couple of Arch Linux in Termux PRoots running on only one device debugging setupTermuxArch.sh on the machines devoted to developing TermuxArch at present. Taking them all (the entire network) for a walk is true freedom granted through Termux, this project.

Running Arch Linux in Termux PRoot in parallel with Termux should be a very simple method to find out why programs like imagemagik, perl, python and similar misbehave in Termux while behaving well in Termux PRoot. Maybe finding out why some packages work in Termux PRoot, but not in Termux should be a priority?

LichP commented 6 years ago

I got up and running quite nicely using the erlang packages and then installing precompiled elixir. One snag I did run into was with installing dependencies with mix - some of the erlang deps built with rebar would refuse to compile, which I managed to trace back to a hard-coded use of /tmp when rebar calls into erlang's insecure_mkdtemp function. Proot can be used to work round this problem:

proot -b $TMPDIR:/tmp /data/data/com.termux/files/usr/bin/bash

This gives you a shell with /tmp effectively bind mounted to Termux's tmp dir, and mix deps.compile should then work (solved it for me installing httpoison in the issues project from the Programming Elixir book)

onlurking commented 6 years ago

@LichP you can run rebar without compiling (and messing around with proot), assuming you have source $HOME/.profile in .bashrc or .zshrc(if you use zsh):

mkdir -p "$HOME/.local/bin"
echo 'export PATH="$PATH:$HOME/.local/bin"' >> $HOME/.profile

curl -fsLo "$HOME/.local/bin/rebar" https://github.com/rebar/rebar/releases/download/2.6.2/rebar
curl -fsLo "$HOME/.local/bin/rebar3" https://github.com/erlang/rebar3/releases/download/3.5.0/rebar3
chmod +x $HOME/.local/bin/rebar && chmod +x $HOME/.local/bin/rebar3
Serkan-devel commented 5 years ago

Any progress on elixir support

ghost commented 5 years ago

Package is now available in unstable-packages repository.

pkg install unstable-repo
pkg install elixir

Based on prebuilt binaries from https://github.com/elixir-lang/elixir/releases.