lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 18.09-beta 81 lines 2.4 kB view raw
1{ pkgs, stdenv, fetchFromGitHub, erlang, rebar, makeWrapper, 2 coreutils, curl, bash, debugInfo ? false }: 3 4{ baseName ? "elixir" 5, version 6, minimumOTPVersion 7, sha256 ? null 8, rev ? "v${version}" 9, src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; } 10}: 11 12let 13 inherit (stdenv.lib) getVersion versionAtLeast; 14 15in 16 assert versionAtLeast (getVersion erlang) minimumOTPVersion; 17 18 stdenv.mkDerivation ({ 19 name = "${baseName}-${version}"; 20 21 inherit src version; 22 23 buildInputs = [ erlang rebar makeWrapper ]; 24 25 LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux 26 "${pkgs.glibcLocales}/lib/locale/locale-archive"; 27 LANG = "en_US.UTF-8"; 28 LC_TYPE = "en_US.UTF-8"; 29 30 setupHook = ./setup-hook.sh; 31 32 inherit debugInfo; 33 34 buildFlags = if debugInfo 35 then "ERL_COMPILER_OPTIONS=debug_info" 36 else ""; 37 38 preBuild = '' 39 # The build process uses ./rebar. Link it to the nixpkgs rebar 40 rm -vf rebar 41 ln -s ${rebar}/bin/rebar rebar 42 43 patchShebangs lib/elixir/generate_app.escript || true 44 45 substituteInPlace Makefile \ 46 --replace "/usr/local" $out 47 ''; 48 49 postFixup = '' 50 # Elixir binaries are shell scripts which run erl. Add some stuff 51 # to PATH so the scripts can run without problems. 52 53 for f in $out/bin/*; do 54 b=$(basename $f) 55 if [ "$b" = mix ]; then continue; fi 56 wrapProgram $f \ 57 --prefix PATH ":" "${stdenv.lib.makeBinPath [ erlang coreutils curl bash ]}" \ 58 --set CURL_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt 59 done 60 61 substituteInPlace $out/bin/mix \ 62 --replace "/usr/bin/env elixir" "${coreutils}/bin/env elixir" 63 ''; 64 65 meta = with stdenv.lib; { 66 homepage = https://elixir-lang.org/; 67 description = "A functional, meta-programming aware language built on top of the Erlang VM"; 68 69 longDescription = '' 70 Elixir is a functional, meta-programming aware language built on 71 top of the Erlang VM. It is a dynamic language with flexible 72 syntax and macro support that leverages Erlang's abilities to 73 build concurrent, distributed and fault-tolerant applications 74 with hot code upgrades. 75 ''; 76 77 license = licenses.epl10; 78 platforms = platforms.unix; 79 maintainers = with maintainers; [ the-kenny havvy couchemar ankhers ]; 80 }; 81 })