diff options
author | David <dlesl@users.noreply.github.com> | 2021-05-10 19:30:25 +0200 |
---|---|---|
committer | Raphael Megzari <raphael@megzari.com> | 2021-05-18 05:40:58 +0900 |
commit | aef59d88560e7985bb04be8f48efcc4653d5eea8 (patch) | |
tree | 0c3b6546277cb734314dd7ddd52ab65c0804fb66 /pkgs/development/beam-modules/build-rebar3.nix | |
parent | 0d66d837d3d130c2e9dfb80e6b0cb0a29f85f2f7 (diff) |
buildRebar3: use `rebar3 bare compile`
Diffstat (limited to 'pkgs/development/beam-modules/build-rebar3.nix')
-rw-r--r-- | pkgs/development/beam-modules/build-rebar3.nix | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/pkgs/development/beam-modules/build-rebar3.nix b/pkgs/development/beam-modules/build-rebar3.nix index 651c024db095e..dc882a1331884 100644 --- a/pkgs/development/beam-modules/build-rebar3.nix +++ b/pkgs/development/beam-modules/build-rebar3.nix @@ -1,12 +1,10 @@ -{ stdenv, writeText, erlang, rebar3WithPlugins, openssl, libyaml, - pc, lib }: +{ stdenv, writeText, erlang, rebar3WithPlugins, openssl, libyaml, lib }: { name, version , src , setupHook ? null , buildInputs ? [], beamDeps ? [], buildPlugins ? [] , postPatch ? "" -, compilePorts ? false , installPhase ? null , buildPhase ? null , configurePhase ? null @@ -21,7 +19,6 @@ let rebar3 = rebar3WithPlugins { plugins = buildPlugins; - globalPlugins = (if compilePorts then [pc] else []); }; shell = drv: stdenv.mkDerivation { @@ -52,18 +49,9 @@ let rm -f rebar rebar3 '' + postPatch; - configurePhase = '' - runHook preConfigure - ${erlang}/bin/escript ${rebar3.bootstrapper} ${debugInfoFlag} - runHook postConfigure - ''; - buildPhase = '' runHook preBuild - HOME=. rebar3 compile - ${if compilePorts then '' - HOME=. rebar3 pc compile - '' else ""} + HOME=. rebar3 bare compile -path "" runHook postBuild ''; @@ -71,10 +59,9 @@ let runHook preInstall mkdir -p "$out/lib/erlang/lib/${name}-${version}" for reldir in src ebin priv include; do - fd="_build/default/lib/${name}/$reldir" - [ -d "$fd" ] || continue - cp -Hrt "$out/lib/erlang/lib/${name}-${version}" "$fd" - success=1 + [ -d "$reldir" ] || continue + # $out/lib/erlang/lib is a convention used in nixpkgs for compiled BEAM packages + cp -Hrt "$out/lib/erlang/lib/${name}-${version}" "$reldir" done runHook postInstall ''; |