summary refs log tree commit diff
path: root/pkgs/development/interpreters/erlang/R16.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-08-23 16:04:53 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-08-23 16:04:53 +0200
commit96cec2a7bdf2482ae58fe04cce5e87a1eec644f9 (patch)
treeea48b901c9ba0ac2b4a249ae94bd966c4a025001 /pkgs/development/interpreters/erlang/R16.nix
parentdb83d9a35b09a7cc548d9b8b2ad63c1f8ca8ba28 (diff)
parent084626deecaffcaa017af07eaab00682eff5d6f3 (diff)
downloadnixlib-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar
nixlib-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.gz
nixlib-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.bz2
nixlib-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.lz
nixlib-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.xz
nixlib-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.tar.zst
nixlib-96cec2a7bdf2482ae58fe04cce5e87a1eec644f9.zip
Merge 'staging' into multiple-outputs
Conflicts:
	pkgs/applications/audio/flac/default.nix
	pkgs/build-support/gcc-wrapper/builder.sh
	pkgs/development/libraries/apr-util/default.nix
	pkgs/development/libraries/apr/default.nix
	pkgs/development/libraries/atk/default.nix
	pkgs/development/libraries/freetype/default.nix
	pkgs/development/libraries/gdk-pixbuf/default.nix
	pkgs/development/libraries/glib/default.nix
	pkgs/development/libraries/glibc/2.17/builder.sh
	pkgs/development/libraries/glibc/2.17/locales.nix
	pkgs/development/libraries/libjpeg/default.nix
	pkgs/development/libraries/libogg/default.nix
	pkgs/development/libraries/libsamplerate/default.nix
	pkgs/development/libraries/libtiff/default.nix
	pkgs/development/libraries/libvorbis/default.nix
	pkgs/development/libraries/mesa/default.nix
	pkgs/development/libraries/pango/default.nix
	pkgs/development/web/nodejs/default.nix
	pkgs/os-specific/linux/pam/default.nix
	pkgs/os-specific/linux/systemd/default.nix
	pkgs/stdenv/generic/setup.sh
	pkgs/stdenv/linux/default.nix
	pkgs/top-level/all-packages.nix
	pkgs/top-level/release-small.nix
Diffstat (limited to 'pkgs/development/interpreters/erlang/R16.nix')
-rw-r--r--pkgs/development/interpreters/erlang/R16.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/erlang/R16.nix b/pkgs/development/interpreters/erlang/R16.nix
new file mode 100644
index 000000000000..5945cdd8299d
--- /dev/null
+++ b/pkgs/development/interpreters/erlang/R16.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchurl, perl, gnum4, ncurses, openssl
+, gnused, gawk, makeWrapper
+, wxSupport ? false, mesa ? null, wxGTK ? null, xlibs ? null }:
+
+assert wxSupport -> mesa != null && wxGTK != null && xlibs != null;
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "erlang-" + version;
+  version = "16B03-1";
+
+  src = fetchurl {
+    url = "http://www.erlang.org/download/otp_src_R${version}.tar.gz";
+    sha256 = "1rvyfh22g1fir1i4xn7v2md868wcmhajwhfsq97v7kn5kd2m7khp";
+  };
+
+  buildInputs =
+    [ perl gnum4 ncurses openssl makeWrapper
+    ] ++ optional wxSupport [ mesa wxGTK xlibs.libX11 ];
+
+  patchPhase = '' sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure '';
+
+  preConfigure = ''
+    export HOME=$PWD/../
+    sed -e s@/bin/pwd@pwd@g -i otp_build
+  '';
+
+  configureFlags= "--with-ssl=${openssl} ${optionalString stdenv.isDarwin "--enable-darwin-64bit"}";
+
+  postInstall = let
+    manpages = fetchurl {
+      url = "http://www.erlang.org/download/otp_doc_man_R${version}.tar.gz";
+      sha256 = "17f3k5j17rdsah18gywjngip6cbfgp6nb9di6il4pahmf9yvqc8g";
+    };
+  in ''
+    ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call
+    tar xf "${manpages}" -C "$out/lib/erlang"
+    for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do
+      prefix="''${i%/*}"
+      ensureDir "$out/share/man/''${prefix##*/}"
+      ln -s "$i" "$out/share/man/''${prefix##*/}/''${i##*/}erl"
+    done
+  '';
+
+  # Some erlang bin/ scripts run sed and awk
+  postFixup = ''
+    wrapProgram $out/lib/erlang/bin/erl --prefix PATH ":" "${gnused}/bin/"
+    wrapProgram $out/lib/erlang/bin/start_erl --prefix PATH ":" "${gnused}/bin/:${gawk}/bin"
+  '';
+
+  meta = {
+    homepage = "http://www.erlang.org/";
+    description = "Programming language used for massively scalable soft real-time systems";
+
+    longDescription = ''
+      Erlang is a programming language used to build massively scalable
+      soft real-time systems with requirements on high availability.
+      Some of its uses are in telecoms, banking, e-commerce, computer
+      telephony and instant messaging. Erlang's runtime system has
+      built-in support for concurrency, distribution and fault
+      tolerance.
+    '';
+
+    platforms = platforms.unix;
+    # Note: Maintainer of prev. erlang version was simons. If he wants
+    # to continue maintaining erlang I'm totally ok with that.
+    maintainers = [ maintainers.the-kenny ];
+  };
+}