2017-06-04 18:26:37 +00:00
|
|
|
{ mkDerivation, fetchurl }:
|
2013-08-07 13:38:51 +00:00
|
|
|
|
2017-06-04 18:26:37 +00:00
|
|
|
mkDerivation rec {
|
2014-07-30 10:39:01 +00:00
|
|
|
version = "16B03-1";
|
2013-08-07 13:38:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-07-30 10:39:01 +00:00
|
|
|
url = "http://www.erlang.org/download/otp_src_R${version}.tar.gz";
|
2014-06-05 00:16:50 +00:00
|
|
|
sha256 = "1rvyfh22g1fir1i4xn7v2md868wcmhajwhfsq97v7kn5kd2m7khp";
|
2013-08-07 13:38:51 +00:00
|
|
|
};
|
|
|
|
|
2017-03-19 04:36:15 +00:00
|
|
|
prePatch = ''
|
2017-06-04 18:26:37 +00:00
|
|
|
sed -i "s@/bin/rm@rm@" lib/odbc/configure erts/configure
|
2017-03-19 04:36:15 +00:00
|
|
|
'';
|
|
|
|
|
2013-08-07 13:38:51 +00:00
|
|
|
preConfigure = ''
|
|
|
|
export HOME=$PWD/../
|
|
|
|
sed -e s@/bin/pwd@pwd@g -i otp_build
|
|
|
|
'';
|
|
|
|
|
2017-06-04 18:26:37 +00:00
|
|
|
# Do not install docs, instead use prebuilt versions.
|
|
|
|
installTargets = "install";
|
2014-07-29 00:57:50 +00:00
|
|
|
postInstall = let
|
|
|
|
manpages = fetchurl {
|
2014-07-30 10:39:01 +00:00
|
|
|
url = "http://www.erlang.org/download/otp_doc_man_R${version}.tar.gz";
|
2014-07-29 00:57:50 +00:00
|
|
|
sha256 = "17f3k5j17rdsah18gywjngip6cbfgp6nb9di6il4pahmf9yvqc8g";
|
|
|
|
};
|
|
|
|
in ''
|
|
|
|
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
|
2014-02-26 18:28:36 +00:00
|
|
|
'';
|
2013-08-07 13:38:51 +00:00
|
|
|
}
|