|
|
|
@ -1,12 +1,32 @@ |
|
|
|
|
{ pkgs, lib, stdenv, fetchFromGitHub, makeWrapper, gawk, gnum4, gnused |
|
|
|
|
, libxml2, libxslt, ncurses, openssl, perl, autoconf |
|
|
|
|
{ pkgs |
|
|
|
|
, lib |
|
|
|
|
, stdenv |
|
|
|
|
, fetchFromGitHub |
|
|
|
|
, makeWrapper |
|
|
|
|
, gawk |
|
|
|
|
, gnum4 |
|
|
|
|
, gnused |
|
|
|
|
, libxml2 |
|
|
|
|
, libxslt |
|
|
|
|
, ncurses |
|
|
|
|
, openssl |
|
|
|
|
, perl |
|
|
|
|
, autoconf |
|
|
|
|
, openjdk11 ? null # javacSupport |
|
|
|
|
, unixODBC ? null # odbcSupport |
|
|
|
|
, libGL ? null, libGLU ? null, wxGTK ? null, wxmac ? null, xorg ? null |
|
|
|
|
, libGL ? null |
|
|
|
|
, libGLU ? null |
|
|
|
|
, wxGTK ? null |
|
|
|
|
, wxmac ? null |
|
|
|
|
, xorg ? null |
|
|
|
|
, parallelBuild ? false |
|
|
|
|
, systemd, wxSupport ? true |
|
|
|
|
# updateScript deps |
|
|
|
|
, writeScript, common-updater-scripts, coreutils, git |
|
|
|
|
, systemd |
|
|
|
|
, wxSupport ? true |
|
|
|
|
# updateScript deps |
|
|
|
|
, writeScript |
|
|
|
|
, common-updater-scripts |
|
|
|
|
, coreutils |
|
|
|
|
, git |
|
|
|
|
}: |
|
|
|
|
{ baseName ? "erlang" |
|
|
|
|
, version |
|
|
|
@ -18,25 +38,42 @@ |
|
|
|
|
, enableThreads ? true |
|
|
|
|
, enableSmpSupport ? true |
|
|
|
|
, enableKernelPoll ? true |
|
|
|
|
, javacSupport ? false, javacPackages ? [ openjdk11 ] |
|
|
|
|
, odbcSupport ? false, odbcPackages ? [ unixODBC ] |
|
|
|
|
, javacSupport ? false |
|
|
|
|
, javacPackages ? [ openjdk11 ] |
|
|
|
|
, odbcSupport ? false |
|
|
|
|
, odbcPackages ? [ unixODBC ] |
|
|
|
|
, withSystemd ? stdenv.isLinux # systemd support in epmd |
|
|
|
|
, opensslPackage ? openssl |
|
|
|
|
, wxPackages ? [ libGL libGLU wxGTK xorg.libX11 ] |
|
|
|
|
, preUnpack ? "", postUnpack ? "" |
|
|
|
|
, patches ? [], patchPhase ? "", prePatch ? "", postPatch ? "" |
|
|
|
|
, configureFlags ? [], configurePhase ? "", preConfigure ? "", postConfigure ? "" |
|
|
|
|
, buildPhase ? "", preBuild ? "", postBuild ? "" |
|
|
|
|
, installPhase ? "", preInstall ? "", postInstall ? "" |
|
|
|
|
, preUnpack ? "" |
|
|
|
|
, postUnpack ? "" |
|
|
|
|
, patches ? [ ] |
|
|
|
|
, patchPhase ? "" |
|
|
|
|
, prePatch ? "" |
|
|
|
|
, postPatch ? "" |
|
|
|
|
, configureFlags ? [ ] |
|
|
|
|
, configurePhase ? "" |
|
|
|
|
, preConfigure ? "" |
|
|
|
|
, postConfigure ? "" |
|
|
|
|
, buildPhase ? "" |
|
|
|
|
, preBuild ? "" |
|
|
|
|
, postBuild ? "" |
|
|
|
|
, installPhase ? "" |
|
|
|
|
, preInstall ? "" |
|
|
|
|
, postInstall ? "" |
|
|
|
|
, installTargets ? [ "install" "install-docs" ] |
|
|
|
|
, checkPhase ? "", preCheck ? "", postCheck ? "" |
|
|
|
|
, fixupPhase ? "", preFixup ? "", postFixup ? "" |
|
|
|
|
, meta ? {} |
|
|
|
|
, checkPhase ? "" |
|
|
|
|
, preCheck ? "" |
|
|
|
|
, postCheck ? "" |
|
|
|
|
, fixupPhase ? "" |
|
|
|
|
, preFixup ? "" |
|
|
|
|
, postFixup ? "" |
|
|
|
|
, meta ? { } |
|
|
|
|
}: |
|
|
|
|
|
|
|
|
|
assert wxSupport -> (if stdenv.isDarwin |
|
|
|
|
then wxmac != null |
|
|
|
|
else libGL != null && libGLU != null && wxGTK != null && xorg != null); |
|
|
|
|
then wxmac != null |
|
|
|
|
else libGL != null && libGLU != null && wxGTK != null && xorg != null); |
|
|
|
|
|
|
|
|
|
assert odbcSupport -> unixODBC != null; |
|
|
|
|
assert javacSupport -> openjdk11 != null; |
|
|
|
@ -45,7 +82,8 @@ let |
|
|
|
|
inherit (lib) optional optionals optionalAttrs optionalString; |
|
|
|
|
wxPackages2 = if stdenv.isDarwin then [ wxmac ] else wxPackages; |
|
|
|
|
|
|
|
|
|
in stdenv.mkDerivation ({ |
|
|
|
|
in |
|
|
|
|
stdenv.mkDerivation ({ |
|
|
|
|
name = "${baseName}-${version}" |
|
|
|
|
+ optionalString javacSupport "-javac" |
|
|
|
|
+ optionalString odbcSupport "-odbc"; |
|
|
|
@ -109,7 +147,8 @@ in stdenv.mkDerivation ({ |
|
|
|
|
passthru = { |
|
|
|
|
updateScript = |
|
|
|
|
let major = builtins.head (builtins.splitVersion version); |
|
|
|
|
in writeScript "update.sh" '' |
|
|
|
|
in |
|
|
|
|
writeScript "update.sh" '' |
|
|
|
|
#!${stdenv.shell} |
|
|
|
|
set -ox errexit |
|
|
|
|
PATH=${lib.makeBinPath [ common-updater-scripts coreutils git gnused ]} |
|
|
|
@ -145,7 +184,7 @@ in stdenv.mkDerivation ({ |
|
|
|
|
} |
|
|
|
|
// optionalAttrs (preUnpack != "") { inherit preUnpack; } |
|
|
|
|
// optionalAttrs (postUnpack != "") { inherit postUnpack; } |
|
|
|
|
// optionalAttrs (patches != []) { inherit patches; } |
|
|
|
|
// optionalAttrs (patches != [ ]) { inherit patches; } |
|
|
|
|
// optionalAttrs (prePatch != "") { inherit prePatch; } |
|
|
|
|
// optionalAttrs (patchPhase != "") { inherit patchPhase; } |
|
|
|
|
// optionalAttrs (configurePhase != "") { inherit configurePhase; } |
|
|
|
@ -158,7 +197,7 @@ in stdenv.mkDerivation ({ |
|
|
|
|
// optionalAttrs (preCheck != "") { inherit preCheck; } |
|
|
|
|
// optionalAttrs (postCheck != "") { inherit postCheck; } |
|
|
|
|
// optionalAttrs (installPhase != "") { inherit installPhase; } |
|
|
|
|
// optionalAttrs (installTargets != []) { inherit installTargets; } |
|
|
|
|
// optionalAttrs (installTargets != [ ]) { inherit installTargets; } |
|
|
|
|
// optionalAttrs (preInstall != "") { inherit preInstall; } |
|
|
|
|
// optionalAttrs (fixupPhase != "") { inherit fixupPhase; } |
|
|
|
|
// optionalAttrs (preFixup != "") { inherit preFixup; } |
|
|
|
|