diff options
author | Eric Merritt <eric@merritt.tech> | 2016-06-15 07:19:44 -0700 |
---|---|---|
committer | Eric Merritt <eric@merritt.tech> | 2016-06-15 07:19:44 -0700 |
commit | 2e61bd72a161d2f739049d407d6f8d8e0f933f92 (patch) | |
tree | baffe69ca85deb989885ce0377ff6877bf4c564e /pkgs/development/beam-modules/build-mix.nix | |
parent | 285aee3c1212a9b47d20644f846d0be6e3f16163 (diff) | |
download | nixlib-2e61bd72a161d2f739049d407d6f8d8e0f933f92.tar nixlib-2e61bd72a161d2f739049d407d6f8d8e0f933f92.tar.gz nixlib-2e61bd72a161d2f739049d407d6f8d8e0f933f92.tar.bz2 nixlib-2e61bd72a161d2f739049d407d6f8d8e0f933f92.tar.lz nixlib-2e61bd72a161d2f739049d407d6f8d8e0f933f92.tar.xz nixlib-2e61bd72a161d2f739049d407d6f8d8e0f933f92.tar.zst nixlib-2e61bd72a161d2f739049d407d6f8d8e0f933f92.zip |
beamPackages: add the ability to override phases
Diffstat (limited to 'pkgs/development/beam-modules/build-mix.nix')
-rw-r--r-- | pkgs/development/beam-modules/build-mix.nix | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/pkgs/development/beam-modules/build-mix.nix b/pkgs/development/beam-modules/build-mix.nix index 70c186df8a06..3af7ff6f92c7 100644 --- a/pkgs/development/beam-modules/build-mix.nix +++ b/pkgs/development/beam-modules/build-mix.nix @@ -8,6 +8,9 @@ , beamDeps ? [] , postPatch ? "" , compilePorts ? false +, installPhase ? null +, buildPhase ? null +, configurePhase ? null , meta ? {} , ... }@attrs: @@ -38,13 +41,17 @@ let inherit buildInputs; propagatedBuildInputs = [ hexRegistrySnapshot hex elixir ] ++ beamDeps; - configurePhase = '' + configurePhase = if configurePhase == null + then '' runHook preConfigure ${erlang}/bin/escript ${bootstrapper} runHook postConfigure - ''; + '' + else configurePhase ; + - buildPhase = '' + buildPhase = if buildPhase == null + then '' runHook preBuild export HEX_OFFLINE=1 @@ -54,9 +61,11 @@ let MIX_ENV=prod mix compile --debug-info --no-deps-check runHook postBuild - ''; + '' + else buildPhase; - installPhase = '' + installPhase = if installPhase == null + then '' runHook preInstall MIXENV=prod @@ -74,7 +83,8 @@ let done runHook postInstall - ''; + '' + else installPhase; passthru = { packageName = name; |