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