Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Make assertion for OTP version in the generic elixir builder

Changed Elixir 1.5 to include the fact it is an rc release

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