mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
beam-packages: add nodocs target for building ex_doc on 27+
This commit is contained in:
parent
5a24308c38
commit
836658e721
|
@ -19,11 +19,11 @@
|
||||||
, libGLU ? null
|
, libGLU ? null
|
||||||
, wxGTK ? null
|
, wxGTK ? null
|
||||||
, xorg ? null
|
, xorg ? null
|
||||||
, exdoc ? null
|
, ex_doc ? null
|
||||||
, parallelBuild ? false
|
, parallelBuild ? false
|
||||||
, systemd
|
, systemd
|
||||||
, wxSupport ? true
|
, wxSupport ? true
|
||||||
, exdocSupport ? false
|
, ex_docSupport ? false
|
||||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd # systemd support in epmd
|
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd # systemd support in epmd
|
||||||
# updateScript deps
|
# updateScript deps
|
||||||
, writeScript
|
, writeScript
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
, installPhase ? ""
|
, installPhase ? ""
|
||||||
, preInstall ? ""
|
, preInstall ? ""
|
||||||
, postInstall ? ""
|
, postInstall ? ""
|
||||||
, installTargets ? [ "install" "install-docs" ]
|
, installTargets ? if ((lib.versionOlder version "27.0") || ex_docSupport) then [ "install" "install-docs" ] else [ "install" ]
|
||||||
, checkPhase ? ""
|
, checkPhase ? ""
|
||||||
, preCheck ? ""
|
, preCheck ? ""
|
||||||
, postCheck ? ""
|
, postCheck ? ""
|
||||||
|
@ -80,7 +80,7 @@ else libGL != null && libGLU != null && wxGTK != null && xorg != null);
|
||||||
|
|
||||||
assert odbcSupport -> unixODBC != null;
|
assert odbcSupport -> unixODBC != null;
|
||||||
assert javacSupport -> openjdk11 != null;
|
assert javacSupport -> openjdk11 != null;
|
||||||
assert exdocSupport -> exdoc != null;
|
assert ex_docSupport -> ex_doc != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) optional optionals optionalAttrs optionalString;
|
inherit (lib) optional optionals optionalAttrs optionalString;
|
||||||
|
@ -122,15 +122,15 @@ stdenv.mkDerivation ({
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# For OTP 27+ we need ex_doc to build the documentation
|
# For OTP 27+ we need ex_doc to build the documentation
|
||||||
# When exdocSupport is enabled, grab the raw ex_doc executable from the exdoc
|
# 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
|
# derivation. Next, patch the first line to use the escript that will be
|
||||||
# built during the build phase of this derivation. Finally, building the
|
# built during the build phase of this derivation. Finally, building the
|
||||||
# documentation requires the erlang-logo.png asset.
|
# documentation requires the erlang-logo.png asset.
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
./otp_build autoconf
|
./otp_build autoconf
|
||||||
'' + optionalString exdocSupport ''
|
'' + optionalString ex_docSupport ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp ${exdoc}/bin/.ex_doc-wrapped $out/bin/ex_doc
|
cp ${ex_doc}/bin/.ex_doc-wrapped $out/bin/ex_doc
|
||||||
sed -i "1 s:^.*$:#!$out/bin/escript:" $out/bin/ex_doc
|
sed -i "1 s:^.*$:#!$out/bin/escript:" $out/bin/ex_doc
|
||||||
export EX_DOC=$out/bin/ex_doc
|
export EX_DOC=$out/bin/ex_doc
|
||||||
|
|
||||||
|
|
|
@ -16529,6 +16529,12 @@ with pkgs;
|
||||||
wxSupport = false;
|
wxSupport = false;
|
||||||
systemdSupport = false;
|
systemdSupport = false;
|
||||||
};
|
};
|
||||||
|
beam_nodocs = callPackage ./beam-packages.nix {
|
||||||
|
beam = beam_nodocs;
|
||||||
|
wxSupport = false;
|
||||||
|
systemdSupport = false;
|
||||||
|
ex_docSupport = false;
|
||||||
|
};
|
||||||
|
|
||||||
inherit (beam.interpreters)
|
inherit (beam.interpreters)
|
||||||
erlang erlang_27 erlang_26 erlang_25 erlang_24
|
erlang erlang_27 erlang_26 erlang_25 erlang_24
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib
|
{ lib
|
||||||
, beam
|
, beam
|
||||||
|
, beam_nodocs
|
||||||
, callPackage
|
, callPackage
|
||||||
, wxGTK32
|
, wxGTK32
|
||||||
, buildPackages
|
, buildPackages
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, ex_docSupport ? true
|
||||||
, wxSupport ? true
|
, wxSupport ? true
|
||||||
, systemd
|
, systemd
|
||||||
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
, systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd
|
||||||
|
@ -30,9 +32,8 @@ in
|
||||||
wxGTK = wxGTK32;
|
wxGTK = wxGTK32;
|
||||||
parallelBuild = true;
|
parallelBuild = true;
|
||||||
autoconf = buildPackages.autoconf269;
|
autoconf = buildPackages.autoconf269;
|
||||||
exdocSupport = true;
|
inherit (beam_nodocs.packages.erlang_27) ex_doc;
|
||||||
exdoc = self.packages.erlang_26.ex_doc;
|
inherit ex_docSupport wxSupport systemdSupport;
|
||||||
inherit wxSupport systemdSupport;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
erlang_26 = self.beamLib.callErlang ../development/interpreters/erlang/26.nix {
|
erlang_26 = self.beamLib.callErlang ../development/interpreters/erlang/26.nix {
|
||||||
|
|
Loading…
Reference in a new issue