···
···
versionOlder (versions.major (getVersion erlang)) maxShiftMajor;
+
minAssert = versionAtLeast (getVersion erlang) minimumOTPVersion;
+
bothAssert = minAssert && maxAssert;
if stdenv.hostPlatform.isDarwin then
···
erlc_opts = [ "deterministic" ] ++ optionals debugInfo [ "debug_info" ];
+
if !config.allowAliases && !bothAssert then
+
# Don't throw without aliases to not break CI.
+
assert assertMsg bothAssert compatibilityMsg;
+
inherit src version debugInfo;
+
nativeBuildInputs = [ makeWrapper ];
+
buildInputs = [ erlang ];
+
DESTDIR = placeholder "out";
+
ERL_COMPILER_OPTIONS = "[${concatStringsSep "," erlc_opts}]";
+
patchShebangs ${escriptPath} || true
+
# copy stdlib source files for LSP access
+
cp -R "$d/lib" "$out/lib/elixir/$d"
+
# Elixir binaries are shell scripts which run erl. Add some stuff
+
# to PATH so the scripts can run without problems.
+
for f in $out/bin/*; do
+
if [ "$b" = mix ]; then continue; fi
+
substituteInPlace $out/bin/mix \
+
--replace "/usr/bin/env elixir" "${elixirShebang}"
+
passthru.updateScript = nix-update-script {
+
"v(${lib.versions.major version}\\.${lib.versions.minor version}\\.[0-9\\-rc.]+)"
+
"pkgs/development/interpreters/elixir/${lib.versions.major version}.${lib.versions.minor version}.nix"
+
pos = builtins.unsafeGetAttrPos "sha256" args;
+
homepage = "https://elixir-lang.org/";
+
description = "Functional, meta-programming aware language built on top of the Erlang VM";
+
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.
+
license = licenses.asl20;
+
platforms = platforms.unix;
+
teams = [ teams.beam ];