lol
fork

Configure Feed

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

at 23.11-beta 80 lines 2.0 kB view raw
1{ pkgs 2, lib 3, stdenv 4, fetchFromGitHub 5, erlang 6, makeWrapper 7, coreutils 8, curl 9, bash 10, debugInfo ? false 11}: 12 13{ baseName ? "elixir" 14, version 15, minimumOTPVersion 16, sha256 ? null 17, rev ? "v${version}" 18, src ? fetchFromGitHub { inherit rev sha256; owner = "elixir-lang"; repo = "elixir"; } 19, escriptPath ? "lib/elixir/generate_app.escript" 20} @ args: 21 22let 23 inherit (lib) getVersion versionAtLeast optional; 24 25in 26assert versionAtLeast (getVersion erlang) minimumOTPVersion; 27 28stdenv.mkDerivation ({ 29 pname = "${baseName}"; 30 31 inherit src version debugInfo; 32 33 nativeBuildInputs = [ makeWrapper ]; 34 buildInputs = [ erlang ]; 35 36 LANG = "C.UTF-8"; 37 LC_TYPE = "C.UTF-8"; 38 39 buildFlags = optional debugInfo "ERL_COMPILER_OPTIONS=debug_info"; 40 41 preBuild = '' 42 patchShebangs ${escriptPath} || true 43 44 substituteInPlace Makefile \ 45 --replace "/usr/local" $out 46 ''; 47 48 postFixup = '' 49 # Elixir binaries are shell scripts which run erl. Add some stuff 50 # to PATH so the scripts can run without problems. 51 52 for f in $out/bin/*; do 53 b=$(basename $f) 54 if [ "$b" = mix ]; then continue; fi 55 wrapProgram $f \ 56 --prefix PATH ":" "${lib.makeBinPath [ erlang coreutils curl bash ]}" 57 done 58 59 substituteInPlace $out/bin/mix \ 60 --replace "/usr/bin/env elixir" "${coreutils}/bin/env $out/bin/elixir" 61 ''; 62 63 pos = builtins.unsafeGetAttrPos "sha256" args; 64 meta = with lib; { 65 homepage = "https://elixir-lang.org/"; 66 description = "A functional, meta-programming aware language built on top of the Erlang VM"; 67 68 longDescription = '' 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. 74 ''; 75 76 license = licenses.epl10; 77 platforms = platforms.unix; 78 maintainers = teams.beam.members; 79 }; 80})