2017-06-07 22:21:14 +01:00
|
|
|
{ pkgs, mkDerivation }:
|
2016-11-17 11:25:04 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
mkDerivation {
|
2017-06-07 22:21:14 +01:00
|
|
|
baseName = "erlang";
|
2017-12-08 13:19:49 +00:00
|
|
|
version = "16B02.basho10";
|
2016-11-17 11:25:04 +00:00
|
|
|
|
2017-06-07 22:21:14 +01:00
|
|
|
src = pkgs.fetchFromGitHub {
|
2016-12-02 15:12:14 +00:00
|
|
|
owner = "basho";
|
|
|
|
repo = "otp";
|
2017-12-08 13:19:49 +00:00
|
|
|
rev = "OTP_R16B02_basho10";
|
|
|
|
sha256 = "1s2c3ag9dnp6xmcr27kh95n1w50xly97n1mp8ivc2a3gpv4blqmj";
|
2016-11-17 11:25:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
export HOME=$PWD/../
|
|
|
|
export LANG=C
|
|
|
|
export ERL_TOP=$(pwd)
|
|
|
|
sed -e s@/bin/pwd@pwd@g -i otp_build
|
2017-06-07 22:21:14 +01:00
|
|
|
sed -e s@"/usr/bin/env escript"@$(pwd)/bootstrap/bin/escript@g -i lib/diameter/bin/diameterc
|
2016-11-17 11:25:04 +00:00
|
|
|
|
2017-03-19 04:36:15 +00:00
|
|
|
./otp_build autoconf
|
2016-11-17 11:25:04 +00:00
|
|
|
'';
|
|
|
|
|
2017-06-07 22:21:14 +01:00
|
|
|
enableHipe = false;
|
|
|
|
|
|
|
|
# Do not install docs, instead use prebuilt versions.
|
|
|
|
installTargets = "install";
|
2016-11-17 11:25:04 +00:00
|
|
|
postInstall = let
|
2017-06-07 22:21:14 +01:00
|
|
|
manpages = pkgs.fetchurl {
|
2019-07-10 20:52:51 +01:00
|
|
|
url = "https://www.erlang.org/download/otp_doc_man_R16B02.tar.gz";
|
2016-12-02 15:12:14 +00:00
|
|
|
sha256 = "12apxjmmd591y9g9bhr97z5jbd1jarqg7wj0y2sqhl21hc1yp75p";
|
2016-11-17 11:25:04 +00:00
|
|
|
};
|
|
|
|
in ''
|
2017-06-07 22:21:14 +01:00
|
|
|
sed -e s@$(pwd)/bootstrap/bin/escript@$out/bin/escript@g -i $out/lib/erlang/lib/diameter-1.4.3/bin/diameterc
|
|
|
|
|
2016-11-17 11:25:04 +00:00
|
|
|
tar xf "${manpages}" -C "$out/lib/erlang"
|
|
|
|
for i in "$out"/lib/erlang/man/man[0-9]/*.[0-9]; do
|
|
|
|
prefix="''${i%/*}"
|
2018-01-09 03:14:48 +00:00
|
|
|
mkdir -p "$out/share/man/''${prefix##*/}"
|
2016-11-17 11:25:04 +00:00
|
|
|
ln -s "$i" "$out/share/man/''${prefix##*/}/''${i##*/}erl"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/basho/otp/";
|
2016-11-17 11:25:04 +00:00
|
|
|
description = "Programming language used for massively scalable soft real-time systems, Basho fork";
|
|
|
|
|
|
|
|
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.
|
2017-03-19 04:36:15 +00:00
|
|
|
This version of Erlang is Basho's version, forked from Ericsson's
|
2016-11-17 11:25:04 +00:00
|
|
|
repository.
|
|
|
|
'';
|
|
|
|
|
2017-12-08 11:50:39 +00:00
|
|
|
knownVulnerabilities = [ "CVE-2017-1000385" ];
|
|
|
|
|
2016-11-20 15:06:00 +00:00
|
|
|
platforms = ["x86_64-linux" "x86_64-darwin"];
|
2017-06-07 22:21:14 +01:00
|
|
|
license = pkgs.stdenv.lib.licenses.asl20;
|
|
|
|
maintainers = with pkgs.stdenv.lib.maintainers; [ mdaiter ];
|
2016-11-17 11:25:04 +00:00
|
|
|
};
|
|
|
|
}
|