18 , src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; }
19 , escriptPath ? "lib/elixir/generate_app.escript"
23 inherit (lib) getVersion versionAtLeast optional;
26 assert versionAtLeast (getVersion erlang) minimumOTPVersion;
28 stdenv.mkDerivation ({
29 pname = "${baseName}";
31 inherit src version debugInfo;
33 nativeBuildInputs = [ makeWrapper ];
34 buildInputs = [ erlang ];
39 buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info";
42 patchShebangs ${escriptPath} || true
44 substituteInPlace Makefile \
45 --replace "/usr/local" $out
49 # Elixir binaries are shell scripts which run erl. Add some stuff
50 # to PATH so the scripts can run without problems.
52 for f in $out/bin/*; do
54 if [ "$b" = mix ]; then continue; fi
56 --prefix PATH ":" "${lib.makeBinPath [ erlang coreutils curl bash ]}"
59 substituteInPlace $out/bin/mix \
60 --replace "/usr/bin/env elixir" "${coreutils}/bin/env $out/bin/elixir"
63 pos = builtins.unsafeGetAttrPos "sha256" args;
65 homepage = "https://elixir-lang.org/";
66 description = "A functional, meta-programming aware language built on top of the Erlang VM";
69 Elixir is a functional, meta-programming aware language built on
70 top of the Erlang VM. It is a dynamic language with flexible
71 syntax and macro support that leverages Erlang's abilities to
72 build concurrent, distributed and fault-tolerant applications
73 with hot code upgrades.
76 license = licenses.epl10;
77 platforms = platforms.unix;
78 maintainers = teams.beam.members;