erlang: move erlang_basho_R16B02 to Erlang's general builder.

+36 -74
-1
pkgs/development/interpreters/erlang/R16.nix
··· 25 sha256 = "17f3k5j17rdsah18gywjngip6cbfgp6nb9di6il4pahmf9yvqc8g"; 26 }; 27 in '' 28 - ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call 29 tar xf "${manpages}" -C "$out/lib/erlang" 30 for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do 31 prefix="''${i%/*}"
··· 25 sha256 = "17f3k5j17rdsah18gywjngip6cbfgp6nb9di6il4pahmf9yvqc8g"; 26 }; 27 in '' 28 tar xf "${manpages}" -C "$out/lib/erlang" 29 for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do 30 prefix="''${i%/*}"
+14 -60
pkgs/development/interpreters/erlang/R16B02-8-basho.nix
··· 1 - { stdenv, fetchurl, fetchFromGitHub, perl, gnum4, ncurses, openssl, autoconf264, gcc, erlang 2 - , gnused, gawk, makeWrapper 3 - , odbcSupport ? false, unixODBC ? null 4 - , wxSupport ? false, mesa ? null, wxGTK ? null, xorg ? null 5 - , enableDebugInfo ? false 6 - , Carbon ? null, Cocoa ? null }: 7 8 - assert wxSupport -> mesa != null && wxGTK != null && xorg != null; 9 - assert odbcSupport -> unixODBC != null; 10 - 11 - with stdenv.lib; 12 - 13 - stdenv.mkDerivation rec { 14 - name = "erlang-basho-" + version + "${optionalString odbcSupport "-odbc"}"; 15 version = "16B02"; 16 17 - src = fetchFromGitHub { 18 owner = "basho"; 19 repo = "otp"; 20 rev = "OTP_R16B02_basho8"; 21 sha256 = "1w0hbm0axxxa45v3kl6bywc9ayir5vwqxjpnjlzc616ldszb2m0x"; 22 }; 23 - 24 - debugInfo = enableDebugInfo; 25 - 26 - buildInputs = 27 - [ perl gnum4 ncurses openssl makeWrapper autoconf264 gcc 28 - ] ++ optional wxSupport [ mesa wxGTK xorg.libX11 ] 29 - ++ optional odbcSupport [ unixODBC ] 30 - ++ optionals stdenv.isDarwin [ Carbon Cocoa ]; 31 - 32 - # Clang 4 (rightfully) thinks signed comparisons of pointers with NULL are nonsense 33 - prePatch = '' 34 - substituteInPlace lib/wx/c_src/wxe_impl.cpp --replace 'temp > NULL' 'temp != NULL' 35 - ''; 36 - 37 - patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure.in erts/configure.in ''; 38 - 39 - postPatch = '' 40 - patchSheBangs make 41 - ''; 42 43 preConfigure = '' 44 export HOME=$PWD/../ 45 export LANG=C 46 export ERL_TOP=$(pwd) 47 sed -e s@/bin/pwd@pwd@g -i otp_build 48 - sed -e s@"/usr/bin/env escript"@${erlang}/bin/escript@g -i lib/diameter/bin/diameterc 49 - ''; 50 51 - configureFlags= [ 52 - "--with-ssl=${openssl.dev}" 53 - "--enable-smp-support" 54 - "--enable-threads" 55 - "--enable-kernel-poll" 56 - "--disable-hipe" 57 - "${optionalString odbcSupport "--with-odbc=${unixODBC}"}" 58 - "${optionalString stdenv.isDarwin "--enable-darwin-64bit"}" 59 - "${optionalString stdenv.isLinux "--enable-m64-build"}" 60 - ]; 61 - 62 - buildPhase = '' 63 ./otp_build autoconf 64 - ./otp_build setup -a --prefix=$out $configureFlags 65 ''; 66 67 postInstall = let 68 - manpages = fetchurl { 69 url = "http://www.erlang.org/download/otp_doc_man_R${version}.tar.gz"; 70 sha256 = "12apxjmmd591y9g9bhr97z5jbd1jarqg7wj0y2sqhl21hc1yp75p"; 71 }; 72 in '' 73 - ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call 74 tar xf "${manpages}" -C "$out/lib/erlang" 75 for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do 76 prefix="''${i%/*}" ··· 79 done 80 ''; 81 82 - # Some erlang bin/ scripts run sed and awk 83 - postFixup = '' 84 - wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/" 85 - wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${gnused}/bin/:${gawk}/bin" 86 - ''; 87 - 88 - setupHook = ./setup-hook.sh; 89 - 90 meta = { 91 homepage = "https://github.com/basho/otp/"; 92 description = "Programming language used for massively scalable soft real-time systems, Basho fork"; ··· 103 ''; 104 105 platforms = ["x86_64-linux" "x86_64-darwin"]; 106 - license = stdenv.lib.licenses.asl20; 107 - maintainers = with maintainers; [ mdaiter ]; 108 }; 109 }
··· 1 + { pkgs, mkDerivation }: 2 3 + mkDerivation rec { 4 + baseName = "erlang"; 5 version = "16B02"; 6 7 + src = pkgs.fetchFromGitHub { 8 owner = "basho"; 9 repo = "otp"; 10 rev = "OTP_R16B02_basho8"; 11 sha256 = "1w0hbm0axxxa45v3kl6bywc9ayir5vwqxjpnjlzc616ldszb2m0x"; 12 }; 13 14 preConfigure = '' 15 export HOME=$PWD/../ 16 export LANG=C 17 export ERL_TOP=$(pwd) 18 sed -e s@/bin/pwd@pwd@g -i otp_build 19 + sed -e s@"/usr/bin/env escript"@$(pwd)/bootstrap/bin/escript@g -i lib/diameter/bin/diameterc 20 21 ./otp_build autoconf 22 ''; 23 24 + enableHipe = false; 25 + 26 + # Do not install docs, instead use prebuilt versions. 27 + installTargets = "install"; 28 postInstall = let 29 + manpages = pkgs.fetchurl { 30 url = "http://www.erlang.org/download/otp_doc_man_R${version}.tar.gz"; 31 sha256 = "12apxjmmd591y9g9bhr97z5jbd1jarqg7wj0y2sqhl21hc1yp75p"; 32 }; 33 in '' 34 + sed -e s@$(pwd)/bootstrap/bin/escript@$out/bin/escript@g -i $out/lib/erlang/lib/diameter-1.4.3/bin/diameterc 35 + 36 tar xf "${manpages}" -C "$out/lib/erlang" 37 for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do 38 prefix="''${i%/*}" ··· 41 done 42 ''; 43 44 meta = { 45 homepage = "https://github.com/basho/otp/"; 46 description = "Programming language used for massively scalable soft real-time systems, Basho fork"; ··· 57 ''; 58 59 platforms = ["x86_64-linux" "x86_64-darwin"]; 60 + license = pkgs.stdenv.lib.licenses.asl20; 61 + maintainers = with pkgs.stdenv.lib.maintainers; [ mdaiter ]; 62 }; 63 }
-1
pkgs/development/interpreters/erlang/R17.nix
··· 25 sha256 = "1hspm285bl7i9a0d4r6j6lm5yk4sb5d9xzpia3simh0z06hv5cc5"; 26 }; 27 in '' 28 - ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call 29 tar xf "${manpages}" -C "$out/lib/erlang" 30 for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do 31 prefix="''${i%/*}"
··· 25 sha256 = "1hspm285bl7i9a0d4r6j6lm5yk4sb5d9xzpia3simh0z06hv5cc5"; 26 }; 27 in '' 28 tar xf "${manpages}" -C "$out/lib/erlang" 29 for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do 30 prefix="''${i%/*}"
+20 -8
pkgs/development/interpreters/erlang/generic-builder.nix
··· 1 - { pkgs, stdenv, fetchurl, fetchFromGitHub, makeWrapper, autoconf, gawk, gnum4, gnused 2 - , libxml2, libxslt, ncurses, openssl, perl 3 , openjdk ? null # javacSupport 4 , unixODBC ? null # odbcSupport 5 , mesa ? null, wxGTK ? null, wxmac ? null, xorg ? null # wxSupport 6 }: 7 8 - { version 9 , sha256 ? null 10 , rev ? "OTP-${version}" 11 , src ? fetchFromGitHub { inherit rev sha256; owner = "erlang"; repo = "otp"; } 12 , enableHipe ? true 13 , enableDebugInfo ? false 14 , javacSupport ? false, javacPackages ? [ openjdk ] 15 , odbcSupport ? false, odbcPackages ? [ unixODBC ] 16 , wxSupport ? true, wxPackages ? [ mesa wxGTK xorg.libX11 ] ··· 22 , installTargets ? "install install-docs" 23 , checkPhase ? "", preCheck ? "", postCheck ? "" 24 , fixupPhase ? "", preFixup ? "", postFixup ? "" 25 }: 26 27 assert wxSupport -> (if stdenv.isDarwin ··· 36 wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages; 37 38 in stdenv.mkDerivation ({ 39 - name = "erlang-${version}" 40 + optionalString javacSupport "-javac" 41 + optionalString odbcSupport "-odbc"; 42 43 inherit src version; 44 45 - buildInputs = [ perl gnum4 ncurses openssl autoconf libxslt libxml2 makeWrapper ] 46 ++ optionals wxSupport wxPackages2 47 ++ optionals odbcSupport odbcPackages 48 ++ optionals javacSupport javacPackages ··· 58 ''; 59 60 postPatch = '' 61 - patchShebangs make 62 63 - ${postPatch} 64 ''; 65 66 preConfigure = '' ··· 68 ''; 69 70 configureFlags = [ "--with-ssl=${openssl.dev}" ] 71 ++ optional enableHipe "--enable-hipe" 72 ++ optional javacSupport "--with-javac" 73 ++ optional odbcSupport "--with-odbc=${unixODBC}" ··· 78 # (PDFs are generated only when fop is available). 79 80 postInstall = '' 81 ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call 82 ''; 83 ··· 125 // optionalAttrs (installPhase != "") { inherit installPhase; } 126 // optionalAttrs (installTargets != "") { inherit installTargets; } 127 // optionalAttrs (preInstall != "") { inherit preInstall; } 128 - // optionalAttrs (postInstall != "") { inherit postInstall; } 129 // optionalAttrs (fixupPhase != "") { inherit fixupPhase; } 130 // optionalAttrs (preFixup != "") { inherit preFixup; } 131 // optionalAttrs (postFixup != "") { inherit postFixup; } 132 )
··· 1 + { pkgs, stdenv, fetchurl, fetchFromGitHub, makeWrapper, gawk, gnum4, gnused 2 + , libxml2, libxslt, ncurses, openssl, perl, gcc, autoreconfHook 3 , openjdk ? null # javacSupport 4 , unixODBC ? null # odbcSupport 5 , mesa ? null, wxGTK ? null, wxmac ? null, xorg ? null # wxSupport 6 }: 7 8 + { baseName ? "erlang" 9 + , version 10 , sha256 ? null 11 , rev ? "OTP-${version}" 12 , src ? fetchFromGitHub { inherit rev sha256; owner = "erlang"; repo = "otp"; } 13 , enableHipe ? true 14 , enableDebugInfo ? false 15 + , enableThreads ? true 16 + , enableSmpSupport ? true 17 + , enableKernelPoll ? true 18 , javacSupport ? false, javacPackages ? [ openjdk ] 19 , odbcSupport ? false, odbcPackages ? [ unixODBC ] 20 , wxSupport ? true, wxPackages ? [ mesa wxGTK xorg.libX11 ] ··· 26 , installTargets ? "install install-docs" 27 , checkPhase ? "", preCheck ? "", postCheck ? "" 28 , fixupPhase ? "", preFixup ? "", postFixup ? "" 29 + , meta ? null 30 }: 31 32 assert wxSupport -> (if stdenv.isDarwin ··· 41 wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages; 42 43 in stdenv.mkDerivation ({ 44 + name = "${baseName}-${version}" 45 + optionalString javacSupport "-javac" 46 + optionalString odbcSupport "-odbc"; 47 48 inherit src version; 49 50 + buildInputs = 51 + [ perl gnum4 ncurses openssl autoreconfHook libxslt libxml2 makeWrapper gcc 52 + ] 53 ++ optionals wxSupport wxPackages2 54 ++ optionals odbcSupport odbcPackages 55 ++ optionals javacSupport javacPackages ··· 65 ''; 66 67 postPatch = '' 68 + ${postPatch} 69 70 + patchShebangs make 71 ''; 72 73 preConfigure = '' ··· 75 ''; 76 77 configureFlags = [ "--with-ssl=${openssl.dev}" ] 78 + ++ optional enableThreads "--enable-threads" 79 + ++ optional enableSmpSupport "--enable-smp-support" 80 + ++ optional enableKernelPoll "--enable-kernel-poll" 81 ++ optional enableHipe "--enable-hipe" 82 ++ optional javacSupport "--with-javac" 83 ++ optional odbcSupport "--with-odbc=${unixODBC}" ··· 88 # (PDFs are generated only when fop is available). 89 90 postInstall = '' 91 + ${postInstall} 92 + 93 ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call 94 ''; 95 ··· 137 // optionalAttrs (installPhase != "") { inherit installPhase; } 138 // optionalAttrs (installTargets != "") { inherit installTargets; } 139 // optionalAttrs (preInstall != "") { inherit preInstall; } 140 // optionalAttrs (fixupPhase != "") { inherit fixupPhase; } 141 // optionalAttrs (preFixup != "") { inherit preFixup; } 142 // optionalAttrs (postFixup != "") { inherit postFixup; } 143 + // optionalAttrs (meta != null) { inherit meta; } 144 )
+2 -4
pkgs/top-level/beam-packages.nix
··· 38 }; 39 40 # Bash fork, using custom builder. 41 - erlang_basho_R16B02 = callPackage ../development/interpreters/erlang/R16B02-8-basho.nix { 42 - inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; 43 }; 44 - erlang_basho_R16B02_odbc = callPackage ../development/interpreters/erlang/R16B02-8-basho.nix { 45 - inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; 46 odbcSupport = true; 47 }; 48
··· 38 }; 39 40 # Bash fork, using custom builder. 41 + erlang_basho_R16B02 = lib.callErlang ../development/interpreters/erlang/R16B02-8-basho.nix { 42 }; 43 + erlang_basho_R16B02_odbc = erlang_basho_R16B02.override { 44 odbcSupport = true; 45 }; 46