JeyHey

JeyHey

Installation of packages without Hex

On my job computer internet connectivity of PowerShell is blocked because of security reasons.

This means that I cannot fetch dependencies by executing mix deps.get. What I can do, is to fetch the dependency by downloading it directly from GitHub through the browser and copying it into the ‘deps’-folder in my mix project. The GitHub repository, however, does not include the hex_metadata.config and the .hex files. This means that I cannot compile my mix project as mix cannot check if I have the right version of the dependency.

So what I do is that I fetch the dependency on my private computer (where everything works) and then send the hex_metadata.config and .hex files to my job computer where I copy them into the folder of the dependency.

My question is: Is there a way of manually fetching the hex_metadata.config and .hex files of a dependency without going via the shell (so I can add dependencies without needing my private computer) ?

Most Liked

hauleth

hauleth

That is what I am telling - work with them to allow access to Hex packages as a trusted source. You can run your own Hex instance that will contain all packages you need.

cmo

cmo

You could try using the git method (with tag or ref option) of defining a dependency or clone the repos and refer to them using the path method in mix.exs.

Silly question, but have you tried running it from the command prompt and not in powershell? And maybe specifying mix.bat ...?

dimitarvp

dimitarvp

Make a Dockerfile that replicates the environment of the wok machine (same CPU arch, no need for the same OS if you’re not compiling inside the container), fetch the packages there and just copy them out of the container on the work machine. That should work.

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
273 38985 115
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New

We're in Beta

About us Mission Statement