Merge pull request #4298 from daogames/tb/elixir-mix-curl-fix

elixir: make curl available to mix
This commit is contained in:
Austin Seipp 2014-10-01 18:54:24 -05:00
commit 5f7d5c09f3

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, erlang, rebar, makeWrapper, coreutils }: { stdenv, fetchurl, erlang, rebar, makeWrapper, coreutils, curl, bash, cacert }:
let let
version = "1.0.0"; version = "1.0.0";
@ -20,6 +20,8 @@ stdenv.mkDerivation {
substituteInPlace Makefile \ substituteInPlace Makefile \
--replace "/usr/local" $out --replace "/usr/local" $out
substituteInPlace bin/mix \
--replace "/usr/bin/env elixir" "$out/bin/elixir"
''; '';
postFixup = '' postFixup = ''
@ -29,7 +31,8 @@ stdenv.mkDerivation {
for f in $out/bin/* for f in $out/bin/*
do do
wrapProgram $f \ wrapProgram $f \
--prefix PATH ":" "${erlang}/bin:${coreutils}/bin" --prefix PATH ":" "${erlang}/bin:${coreutils}/bin:${curl}/bin:${bash}/bin" \
--set CURL_CA_BUNDLE "${cacert}/etc/ca-bundle.crt"
done done
''; '';