beam: nixpkgs-fmt
This commit is contained in:
parent
bd683bb1ef
commit
af0844c7a2
|
@ -1,6 +1,7 @@
|
|||
{ stdenv, writeText, erlang, perl, which, gitMinimal, wget, lib }:
|
||||
|
||||
{ name, version
|
||||
{ name
|
||||
, version
|
||||
, src
|
||||
, setupHook ? null
|
||||
, buildInputs ? [ ]
|
||||
|
@ -13,7 +14,8 @@
|
|||
, meta ? { }
|
||||
, enableDebugInfo ? false
|
||||
, buildFlags ? [ ]
|
||||
, ... }@attrs:
|
||||
, ...
|
||||
}@attrs:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -34,8 +36,10 @@ let
|
|||
|
||||
inherit src;
|
||||
|
||||
setupHook = if setupHook == null
|
||||
then writeText "setupHook.sh" ''
|
||||
setupHook =
|
||||
if setupHook == null
|
||||
then
|
||||
writeText "setupHook.sh" ''
|
||||
addToSearchPath ERL_LIBS "$1/lib/erlang/lib"
|
||||
''
|
||||
else setupHook;
|
||||
|
@ -47,7 +51,8 @@ let
|
|||
++ lib.optional (enableDebugInfo || erlang.debugInfo) ''ERL_OPTS="$ERL_OPTS +debug_info"''
|
||||
++ buildFlags;
|
||||
|
||||
configurePhase = if configurePhase == null
|
||||
configurePhase =
|
||||
if configurePhase == null
|
||||
then ''
|
||||
runHook preConfigure
|
||||
|
||||
|
@ -59,7 +64,8 @@ let
|
|||
''
|
||||
else configurePhase;
|
||||
|
||||
buildPhase = if buildPhase == null
|
||||
buildPhase =
|
||||
if buildPhase == null
|
||||
then ''
|
||||
runHook preBuild
|
||||
|
||||
|
@ -69,7 +75,8 @@ let
|
|||
''
|
||||
else buildPhase;
|
||||
|
||||
installPhase = if installPhase == null
|
||||
installPhase =
|
||||
if installPhase == null
|
||||
then ''
|
||||
runHook preInstall
|
||||
|
||||
|
@ -99,4 +106,5 @@ let
|
|||
inherit beamDeps;
|
||||
};
|
||||
});
|
||||
in fix pkg
|
||||
in
|
||||
fix pkg
|
||||
|
|
|
@ -35,9 +35,7 @@ let
|
|||
|
||||
# add to ERL_LIBS so other modules can find at runtime.
|
||||
# http://erlang.org/doc/man/code.html#code-path
|
||||
# Mix also searches the code path when compiling with the --no-deps-check
|
||||
# flag, which is why there is no complicated booterstrapper like the one
|
||||
# used by buildRebar3.
|
||||
# Mix also searches the code path when compiling with the --no-deps-check flag
|
||||
setupHook = attrs.setupHook or
|
||||
writeText "setupHook.sh" ''
|
||||
addToSearchPath ERL_LIBS "$1/lib/erlang/lib"
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
{ stdenv, writeText, erlang, rebar3WithPlugins, openssl, libyaml, lib }:
|
||||
|
||||
{ name, version
|
||||
{ name
|
||||
, version
|
||||
, src
|
||||
, setupHook ? null
|
||||
, buildInputs ? [], beamDeps ? [], buildPlugins ? []
|
||||
, buildInputs ? [ ]
|
||||
, beamDeps ? [ ]
|
||||
, buildPlugins ? [ ]
|
||||
, postPatch ? ""
|
||||
, installPhase ? null
|
||||
, buildPhase ? null
|
||||
, configurePhase ? null
|
||||
, meta ? { }
|
||||
, enableDebugInfo ? false
|
||||
, ... }@attrs:
|
||||
, ...
|
||||
}@attrs:
|
||||
|
||||
with lib;
|
||||
|
||||
|
|
|
@ -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
|
||||
, systemd
|
||||
, wxSupport ? true
|
||||
# updateScript deps
|
||||
, writeScript, common-updater-scripts, coreutils, git
|
||||
, writeScript
|
||||
, common-updater-scripts
|
||||
, coreutils
|
||||
, git
|
||||
}:
|
||||
{ baseName ? "erlang"
|
||||
, version
|
||||
|
@ -18,19 +38,36 @@
|
|||
, 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 ? ""
|
||||
, checkPhase ? ""
|
||||
, preCheck ? ""
|
||||
, postCheck ? ""
|
||||
, fixupPhase ? ""
|
||||
, preFixup ? ""
|
||||
, postFixup ? ""
|
||||
, meta ? { }
|
||||
}:
|
||||
|
||||
|
@ -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 ]}
|
||||
|
|
Loading…
Reference in a new issue