From 284bdce430562a8e7a271d03fcc122cc4d72d498 Mon Sep 17 00:00:00 2001 From: "Adam C. Stephens" Date: Thu, 20 Mar 2025 19:37:37 +0000 Subject: [PATCH] erlang: stop building web docs --- .../interpreters/erlang/generic-builder.nix | 45 +++++-------------- pkgs/top-level/all-packages.nix | 6 --- pkgs/top-level/beam-packages.nix | 9 +--- 3 files changed, 12 insertions(+), 48 deletions(-) diff --git a/pkgs/development/interpreters/erlang/generic-builder.nix b/pkgs/development/interpreters/erlang/generic-builder.nix index d1cc86697f86..e86b1f434647 100644 --- a/pkgs/development/interpreters/erlang/generic-builder.nix +++ b/pkgs/development/interpreters/erlang/generic-builder.nix @@ -19,11 +19,9 @@ libGLU ? null, wxGTK ? null, xorg ? null, - ex_doc ? null, parallelBuild ? false, systemd, wxSupport ? true, - ex_docSupport ? false, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, # systemd support in epmd # updateScript deps writeScript, @@ -76,14 +74,6 @@ installPhase ? "", preInstall ? "", postInstall ? "", - installTargets ? - if ((lib.versionOlder version "27.0") || ex_docSupport) then - [ - "install" - "install-docs" - ] - else - [ "install" ], checkPhase ? "", preCheck ? "", postCheck ? "", @@ -104,7 +94,6 @@ assert assert odbcSupport -> unixODBC != null; assert javacSupport -> openjdk11 != null; -assert ex_docSupport -> ex_doc != null; let inherit (lib) @@ -140,11 +129,9 @@ stdenv.mkDerivation ( libxml2 ]; - env = lib.optionalAttrs ((lib.versionAtLeast "28.0-rc1" version) && ex_docSupport) { - # erlang-28.0-rc> warning: jinterface.html redirects to ../lib/jinterface/doc/html/index.html, which does not exist - # erlang-28.0-rc> - # erlang-28.0-rc> warning: odbc.html redirects to ../lib/odbc/doc/html/index.html, which does not exist - EX_DOC_WARNINGS_AS_ERRORS = "false"; + env = { + # only build shell/IDE docs and man pages + DOC_TARGETS = "chunks man"; }; buildInputs = @@ -174,24 +161,9 @@ stdenv.mkDerivation ( --replace-fail '"sh ' '"${runtimeShell} ' ''; - # For OTP 27+ we need ex_doc to build the documentation - # When ex_docSupport is enabled, grab the raw ex_doc executable from the ex_doc - # derivation. Next, patch the first line to use the escript that will be - # built during the build phase of this derivation. Finally, building the - # documentation requires the erlang-logo.png asset. - preConfigure = - '' - ./otp_build autoconf - '' - + optionalString ex_docSupport '' - mkdir -p $out/bin - cp ${ex_doc}/bin/.ex_doc-wrapped $out/bin/ex_doc - sed -i "1 s:^.*$:#!$out/bin/escript:" $out/bin/ex_doc - export EX_DOC=$out/bin/ex_doc - - mkdir -p $out/lib/erlang/system/doc/assets - cp $src/system/doc/assets/erlang-logo.png $out/lib/erlang/system/doc/assets - ''; + preConfigure = '' + ./otp_build autoconf + ''; configureFlags = [ "--with-ssl=${lib.getOutput "out" opensslPackage}" ] @@ -211,6 +183,10 @@ stdenv.mkDerivation ( # install-docs will generate and install manpages and html docs # (PDFs are generated only when fop is available). + installTargets = [ + "install" + "install-docs" + ]; postInstall = '' ln -s $out/lib/erlang/lib/erl_interface*/bin/erl_call $out/bin/erl_call @@ -295,7 +271,6 @@ stdenv.mkDerivation ( // optionalAttrs (preCheck != "") { inherit preCheck; } // optionalAttrs (postCheck != "") { inherit postCheck; } // optionalAttrs (installPhase != "") { inherit installPhase; } - // optionalAttrs (installTargets != [ ]) { inherit installTargets; } // optionalAttrs (preInstall != "") { inherit preInstall; } // optionalAttrs (fixupPhase != "") { inherit fixupPhase; } // optionalAttrs (preFixup != "") { inherit preFixup; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c0963d06bed..34ef087548c4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6904,12 +6904,6 @@ with pkgs; wxSupport = false; systemdSupport = false; }; - beam_nodocs = callPackage ./beam-packages.nix { - beam = beam_nodocs; - wxSupport = false; - systemdSupport = false; - ex_docSupport = false; - }; inherit (beam.interpreters) erlang erlang_28 erlang_27 erlang_26 erlang_25 diff --git a/pkgs/top-level/beam-packages.nix b/pkgs/top-level/beam-packages.nix index 3e2fdd18d0ae..5276382b4f8e 100644 --- a/pkgs/top-level/beam-packages.nix +++ b/pkgs/top-level/beam-packages.nix @@ -1,12 +1,10 @@ { lib, beam, - beam_nodocs, callPackage, wxGTK32, buildPackages, stdenv, - ex_docSupport ? true, wxSupport ? true, systemd, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, @@ -34,17 +32,14 @@ in erlang_28 = self.beamLib.callErlang ../development/interpreters/erlang/28.nix { wxGTK = wxGTK32; parallelBuild = true; - # ex_doc failing to build with erlang 28 - inherit (beam_nodocs.packages.erlang_27) ex_doc; - inherit ex_docSupport wxSupport systemdSupport; + inherit wxSupport systemdSupport; }; erlang_27 = self.beamLib.callErlang ../development/interpreters/erlang/27.nix { wxGTK = wxGTK32; parallelBuild = true; autoconf = buildPackages.autoconf269; - inherit (beam_nodocs.packages.erlang_27) ex_doc; - inherit ex_docSupport wxSupport systemdSupport; + inherit wxSupport systemdSupport; }; erlang_26 = self.beamLib.callErlang ../development/interpreters/erlang/26.nix {