File 0006-Fix-build-on-v1.2.1-236.patch of Package elixir-hex

From 1f97df11e6ab12b700de87c941c7fe424044df43 Mon Sep 17 00:00:00 2001
From: Wojtek Mach <wojtekmach@users.noreply.github.com>
Date: Tue, 14 Jun 2016 20:33:50 +0200
Subject: [PATCH 06/13] Fix build on v1.2.1 (#236)

---
 test/support/hex_web.ex | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/support/hex_web.ex b/test/support/hex_web.ex
index c30c91a..01bb561 100644
--- a/test/support/hex_web.ex
+++ b/test/support/hex_web.ex
@@ -112,7 +112,12 @@ defmodule HexTest.HexWeb do
   end
 
   defp hexweb_mix_archives do
-    (System.get_env("HEXWEB_MIX_ARCHIVES") || Mix.Local.path_for(:archive))
+    archives_path =
+      if function_exported?(Mix.Local, :path_for, 1),
+        do: Mix.Local.path_for(:archive),
+      else: Mix.Local.archives_path
+
+    (System.get_env("HEXWEB_MIX_ARCHIVES") || archives_path)
     |> Path.expand
   end
 
-- 
2.1.4

openSUSE Build Service is sponsored by