diff options
author | happysalada <raphael@megzari.com> | 2021-07-28 14:44:45 +0900 |
---|---|---|
committer | Raphael Megzari <raphael@megzari.com> | 2021-08-04 12:05:00 +0900 |
commit | fc2518d7d2a62d1a786342cd71fdb9eb14067f3a (patch) | |
tree | 022ae2b475b174cdb7809d6ec80f46b9d1d7ade5 /pkgs/development/beam-modules | |
parent | ef5d272e9eb62d124ec8503bf35c824e04f972a5 (diff) | |
download | nixpkgs-fc2518d7d2a62d1a786342cd71fdb9eb14067f3a.tar nixpkgs-fc2518d7d2a62d1a786342cd71fdb9eb14067f3a.tar.gz nixpkgs-fc2518d7d2a62d1a786342cd71fdb9eb14067f3a.tar.bz2 nixpkgs-fc2518d7d2a62d1a786342cd71fdb9eb14067f3a.tar.lz nixpkgs-fc2518d7d2a62d1a786342cd71fdb9eb14067f3a.tar.xz nixpkgs-fc2518d7d2a62d1a786342cd71fdb9eb14067f3a.tar.zst nixpkgs-fc2518d7d2a62d1a786342cd71fdb9eb14067f3a.zip |
mix-release: add ERL_LIBS paths to _build dir
Diffstat (limited to 'pkgs/development/beam-modules')
-rw-r--r-- | pkgs/development/beam-modules/mix-release.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/development/beam-modules/mix-release.nix b/pkgs/development/beam-modules/mix-release.nix index 80e8721302e..d9eea7c3b6f 100644 --- a/pkgs/development/beam-modules/mix-release.nix +++ b/pkgs/development/beam-modules/mix-release.nix @@ -58,6 +58,20 @@ stdenv.mkDerivation (overridable // { configurePhase = attrs.configurePhase or '' runHook preConfigure + mkdir -p _build/$MIX_ENV/lib + while read -d ':' lib; do + for dir in $lib/*; do + # Strip version number for directory name if it exists, so naming of + # all libs matches what mix's expectation. + dest=$(basename $dir | cut -d '-' -f1) + echo "Linking $dir to _build/$MIX_ENV/lib/$dest" + # Symlink libs to _build so that mix can find them when compiling. + # This is what allows mix to compile the package without searching + # for dependencies over the network. + ln -s $dir _build/$MIX_ENV/lib/$dest + done + done <<< "$ERL_LIBS:" + # this is needed for projects that have a specific compile step # the dependency needs to be compiled in order for the task # to be available |