summary refs log tree commit diff
path: root/pkgs/development/beam-modules/fetch-mix-deps.nix
diff options
context:
space:
mode:
authorhappysalada <raphael@megzari.com>2021-02-01 09:58:51 +0900
committerhappysalada <raphael@megzari.com>2021-02-01 09:58:51 +0900
commitf38079ff95813ff20ca8b8077e187baa54e90240 (patch)
treed042aed6e5bf31f2727b7573aea6e783e07cb713 /pkgs/development/beam-modules/fetch-mix-deps.nix
parent39c85b0bcfe1f807389225492d6efa72c58fa192 (diff)
downloadnixpkgs-f38079ff95813ff20ca8b8077e187baa54e90240.tar
nixpkgs-f38079ff95813ff20ca8b8077e187baa54e90240.tar.gz
nixpkgs-f38079ff95813ff20ca8b8077e187baa54e90240.tar.bz2
nixpkgs-f38079ff95813ff20ca8b8077e187baa54e90240.tar.lz
nixpkgs-f38079ff95813ff20ca8b8077e187baa54e90240.tar.xz
nixpkgs-f38079ff95813ff20ca8b8077e187baa54e90240.tar.zst
nixpkgs-f38079ff95813ff20ca8b8077e187baa54e90240.zip
use lib only where required
use standard phases
Diffstat (limited to 'pkgs/development/beam-modules/fetch-mix-deps.nix')
-rw-r--r--pkgs/development/beam-modules/fetch-mix-deps.nix14
1 files changed, 5 insertions, 9 deletions
diff --git a/pkgs/development/beam-modules/fetch-mix-deps.nix b/pkgs/development/beam-modules/fetch-mix-deps.nix
index 5103e63dce5..020a82ad70b 100644
--- a/pkgs/development/beam-modules/fetch-mix-deps.nix
+++ b/pkgs/development/beam-modules/fetch-mix-deps.nix
@@ -1,14 +1,10 @@
-{ stdenvNoCC, elixir, hex, rebar, rebar3, cacert, git }:
+{ stdenvNoCC, lib, elixir, hex, rebar, rebar3, cacert, git }:
 
 { name, version, sha256, src, mixEnv ? "prod", debug ? false, meta ? { } }:
 
-with stdenvNoCC.lib;
-
 stdenvNoCC.mkDerivation ({
   name = "mix-deps-${name}-${version}";
 
-  phases = [ "configurePhase" "downloadPhase" ];
-
   nativeBuildInputs = [ elixir hex cacert git ];
 
   inherit src;
@@ -29,9 +25,9 @@ stdenvNoCC.mkDerivation ({
     export REBAR_CACHE_DIR="$TMPDIR/rebar3.cache"
   '';
 
-  downloadPhase = ''
-    ln -s ${src}/mix.exs ./mix.exs
-    ln -s ${src}/mix.lock ./mix.lock
+  dontBuild = true;
+
+  installPhase = ''
     mix deps.get --only ${mixEnv}
   '';
 
@@ -39,6 +35,6 @@ stdenvNoCC.mkDerivation ({
   outputHashMode = "recursive";
   outputHash = sha256;
 
-  impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars;
+  impureEnvVars = lib.fetchers.proxyImpureEnvVars;
   inherit meta;
 })