2013-08-26 02:44:54 +02:00
|
|
|
{ stdenv, fetchurl, erlang, rebar, makeWrapper, coreutils }:
|
2013-08-07 16:06:11 +02:00
|
|
|
|
2013-11-29 17:00:04 +01:00
|
|
|
let
|
|
|
|
version = "0.11.2";
|
|
|
|
in
|
2013-08-07 16:06:11 +02:00
|
|
|
stdenv.mkDerivation {
|
2013-11-29 17:00:04 +01:00
|
|
|
name = "elixir-${version}";
|
2013-08-07 16:06:11 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-11-29 17:00:04 +01:00
|
|
|
url = "https://github.com/elixir-lang/elixir/archive/v${version}.tar.gz";
|
|
|
|
sha256 = "0rgx33q013c5y2jjwd4l93pzd3v3fha8xdsrhpl9c9wb7yprjc5x";
|
2013-08-07 16:06:11 +02:00
|
|
|
};
|
|
|
|
|
2013-08-26 02:44:54 +02:00
|
|
|
buildInputs = [ erlang rebar makeWrapper ];
|
2013-08-07 16:06:11 +02:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace rebar \
|
|
|
|
--replace "/usr/bin/env escript" ${erlang}/bin/escript
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace '$(shell echo `pwd`/rebar)' ${rebar}/bin/rebar \
|
|
|
|
--replace "/usr/local" $out
|
|
|
|
'';
|
2013-08-07 16:09:08 +02:00
|
|
|
|
2013-08-26 02:44:54 +02:00
|
|
|
postFixup = ''
|
|
|
|
# Elixirs binaries are shell scripts which run erl. This adds some
|
|
|
|
# stuff to PATH so the scripts run without problems.
|
|
|
|
|
|
|
|
for f in $out/bin/*
|
|
|
|
do
|
|
|
|
wrapProgram $f \
|
|
|
|
--prefix PATH ":" "${erlang}/bin:${coreutils}/bin"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2013-09-26 21:37:49 +02:00
|
|
|
meta = with stdenv.lib; {
|
2013-08-07 16:09:08 +02:00
|
|
|
homepage = "http://elixir-lang.org/";
|
2013-09-26 21:37:49 +02:00
|
|
|
description = "A functional, meta-programming aware language built on top of the Erlang VM";
|
2013-08-07 16:09:08 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
2013-11-29 17:00:04 +01:00
|
|
|
Elixir is a functional, meta-programming aware language built on
|
|
|
|
top of the Erlang VM. It is a dynamic language with flexible
|
|
|
|
syntax and macro support that leverages Erlang's abilities to
|
|
|
|
build concurrent, distributed and fault-tolerant applications
|
|
|
|
with hot code upgrades.
|
2013-08-07 16:09:08 +02:00
|
|
|
'';
|
|
|
|
|
2013-09-26 21:37:49 +02:00
|
|
|
license = licenses.epl10;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.the-kenny ];
|
2013-08-07 16:09:08 +02:00
|
|
|
};
|
2013-08-07 16:06:11 +02:00
|
|
|
}
|