Coder Social home page Coder Social logo

Comments (5)

ericmj avatar ericmj commented on July 30, 2024 1

mix archive.build && MIX_HOME=/opt/local/... mix archive.install hex.ez would do that. You also need to set MIX_HOME before running any mix tasks that use Hex.

EDIT: Although I am not sure how that will work for other Macports users that have Elixir installed and expect MIX_HOME to be unset since other things will also be affected by that environment variable.

from hex.

barracuda156 avatar barracuda156 commented on July 30, 2024 1

EDIT: Although I am not sure how that will work for other Macports users that have Elixir installed and expect MIX_HOME to be unset since other things will also be affected by that environment variable.

Elixir itself is there in Macports (so presumably it will be installed via Macports), but Hex is not, presently. Then, making portfile for Hex, I will set it to depend on port:elixir, that will ensure that Macports’ Elixir is used (if another copy of Elixir is installed, it will be in the path that will not be searched, so hopefully no conflict arises).

from hex.

ericmj avatar ericmj commented on July 30, 2024

The mix install task is only supposed to be used for development and does not support any custom options.

The recommended way to install hex is using the mix local.hex that ships with Elixir and it will install hex in $HOME/.mix/archives or $MIX_HOME/archives.

If you wish to do a local build of Hex you can use mix archive.build with the -o flag to specify an output file path. But note mix will load archives from the archive directory location above.

You can also use mix archive.install to install archives.

You can find the documentation for these tasks here: https://hexdocs.pm/mix/Mix.Tasks.Local.Hex.html

from hex.

barracuda156 avatar barracuda156 commented on July 30, 2024

@ericmj Thank you for replying. I want to add hex to Macports, since it is needed to build an Elixir package. For that, we have to build it from source (either tarball or fetch from git branch) and install into destroot (installing directly will violate Macports prefix). In result, all files should be in /opt/local/* (Macports build system will move everything from ${destroot}${prefix} into ${prefix}).

Which option would be suitable for that?

from hex.

ericmj avatar ericmj commented on July 30, 2024

Actually, if you use MIX_ARCHIVES instead of MIX_HOME it should minimize the risk of conflicts since it is specifically for archives and has no other uses.

from hex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.