1212 openssl ,
1313 perl ,
1414 runtimeShell ,
15- autoconf ,
1615 openjdk11 ? null , # javacSupport
1716 unixODBC ? null , # odbcSupport
1817 libGL ? null ,
1918 libGLU ? null ,
2019 wxGTK ? null ,
2120 xorg ? null ,
22- ex_doc ? null ,
2321 parallelBuild ? false ,
2422 systemd ,
2523 wxSupport ? true ,
26- ex_docSupport ? false ,
2724 systemdSupport ? lib . meta . availableOn stdenv . hostPlatform systemd , # systemd support in epmd
2825 # updateScript deps
2926 writeScript ,
7673 installPhase ? "" ,
7774 preInstall ? "" ,
7875 postInstall ? "" ,
79- installTargets ?
80- if ( ( lib . versionOlder version "27.0" ) || ex_docSupport ) then
81- [
82- "install"
83- "install-docs"
84- ]
85- else
86- [ "install" ] ,
8776 checkPhase ? "" ,
8877 preCheck ? "" ,
8978 postCheck ? "" ,
@@ -104,7 +93,6 @@ assert
10493
10594assert odbcSupport -> unixODBC != null ;
10695assert javacSupport -> openjdk11 != null ;
107- assert ex_docSupport -> ex_doc != null ;
10896
10997let
11098 inherit ( lib )
@@ -132,19 +120,16 @@ stdenv.mkDerivation (
132120 LANG = "C.UTF-8" ;
133121
134122 nativeBuildInputs = [
135- autoconf
136123 makeWrapper
137124 perl
138125 gnum4
139126 libxslt
140127 libxml2
141128 ] ;
142129
143- env = lib . optionalAttrs ( ( lib . versionAtLeast "28.0-rc1" version ) && ex_docSupport ) {
144- # erlang-28.0-rc> warning: jinterface.html redirects to ../lib/jinterface/doc/html/index.html, which does not exist
145- # erlang-28.0-rc>
146- # erlang-28.0-rc> warning: odbc.html redirects to ../lib/odbc/doc/html/index.html, which does not exist
147- EX_DOC_WARNINGS_AS_ERRORS = "false" ;
130+ env = {
131+ # only build shell/IDE docs and man pages
132+ DOC_TARGETS = "chunks man" ;
148133 } ;
149134
150135 buildInputs =
@@ -174,25 +159,6 @@ stdenv.mkDerivation (
174159 --replace-fail '"sh ' '"${ runtimeShell } '
175160 '' ;
176161
177- # For OTP 27+ we need ex_doc to build the documentation
178- # When ex_docSupport is enabled, grab the raw ex_doc executable from the ex_doc
179- # derivation. Next, patch the first line to use the escript that will be
180- # built during the build phase of this derivation. Finally, building the
181- # documentation requires the erlang-logo.png asset.
182- preConfigure =
183- ''
184- ./otp_build autoconf
185- ''
186- + optionalString ex_docSupport ''
187- mkdir -p $out/bin
188- cp ${ ex_doc } /bin/.ex_doc-wrapped $out/bin/ex_doc
189- sed -i "1 s:^.*$:#!$out/bin/escript:" $out/bin/ex_doc
190- export EX_DOC=$out/bin/ex_doc
191-
192- mkdir -p $out/lib/erlang/system/doc/assets
193- cp $src/system/doc/assets/erlang-logo.png $out/lib/erlang/system/doc/assets
194- '' ;
195-
196162 configureFlags =
197163 [ "--with-ssl=${ lib . getOutput "out" opensslPackage } " ]
198164 ++ [ "--with-ssl-incl=${ lib . getDev opensslPackage } " ] # This flag was introduced in R24
@@ -211,6 +177,10 @@ stdenv.mkDerivation (
211177
212178 # install-docs will generate and install manpages and html docs
213179 # (PDFs are generated only when fop is available).
180+ installTargets = [
181+ "install"
182+ "install-docs"
183+ ] ;
214184
215185 postInstall = ''
216186 ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call
@@ -295,7 +265,6 @@ stdenv.mkDerivation (
295265 // optionalAttrs ( preCheck != "" ) { inherit preCheck ; }
296266 // optionalAttrs ( postCheck != "" ) { inherit postCheck ; }
297267 // optionalAttrs ( installPhase != "" ) { inherit installPhase ; }
298- // optionalAttrs ( installTargets != [ ] ) { inherit installTargets ; }
299268 // optionalAttrs ( preInstall != "" ) { inherit preInstall ; }
300269 // optionalAttrs ( fixupPhase != "" ) { inherit fixupPhase ; }
301270 // optionalAttrs ( preFixup != "" ) { inherit preFixup ; }
0 commit comments