Skip to content

Instantly share code, notes, and snippets.

@Sharktheone
Last active December 7, 2023 15:44
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save Sharktheone/79da849c96db13f21eefa2be9430d9ec to your computer and use it in GitHub Desktop.
Save Sharktheone/79da849c96db13f21eefa2be9430d9ec to your computer and use it in GitHub Desktop.
Install the new mojo programming language on Arch. This will be obsolete when mojo adds official Arch support.
@Jayuda
Copy link

Jayuda commented Sep 11, 2023

nice. thanks

@Lynet101
Copy link

Absolute legend

@syslev
Copy link

syslev commented Sep 13, 2023

Marry me

@paulie-g
Copy link

Thank you very much. Tremendously helpful. install.sh did not work for me as is. First, you have to run it with PIP_BREAK_SYSTEM_PACKAGES=1 because up-to-date pip will refuse to install any packages otherwise (it now insists you use distro package manager). Secondly, the auth didn't work, so I just hardcoded my auth token.

@Sharktheone
Copy link
Author

@paulie-g Okay, thanks for the feedback, i am currently working on a rewrite of the script, and also only one complete script with different options. I have spotted the misstake with the auth, but it should use a python venv, to get rid of the externally managed thing.

@paulie-g
Copy link

@Sharktheone Brilliant. Once again, thanks for putting this all together. Yes, a venv is preferable, but realistically this new pip policy is most important for distros that have python-based tools. Managing a mixture of distro-packaged and pip-installed packages really hasn't been a big problem on Arch in my experience. I personally consider the systemwide installation in this particular case to be an acceptable kludge because it's unlikely to conflict with repo packages.

@paulie-g
Copy link

Might make sense to stick your modular PKGBUILD on AUR? I know that was the first thing I checked. If it had been there, I'd probably have just done the rest of the install by hand. Maybe stick the compat libs in ~/.local/lib?

@Sharktheone
Copy link
Author

Hmm, i don't have tested putting the libs in ~/.local/lib, but i cant test it. Putting the PKGBUILD on the AUR might make sense when i have finished the new updated script, but i definetly want to what @Janrupf says about that, because he wrote the script initially.

@paulie-g
Copy link

I meant the PKGBUILD for modular, since it's ready, could go on AUR. Just a suggestion.

@Sharktheone
Copy link
Author

Yes, but again, i didn't wrote the PKGBUILD for modular, so i don't want to upload it on the AUR, unless i have permission from the Author.
For mojo it might make sense to also write a PKGBUILD that just executes the script / a modified version, which does not install modular by downloading the PKGBUILD file and execute it, but by a dependency.

@Sharktheone
Copy link
Author

I have updated a script and also created a repository for this, since gist is very very nifty when it comes to pasting files. I am now also using the ~/.local/lib directory for the libraries, but left the option to just put them into /usr/lib and /lib.

@paulie-g
Copy link

paulie-g commented Sep 18, 2023

Well done, thank you very much. I can't test it since I don't really want to mess with the install I've got, but your efforts are sincerely appreciated. Hopefully the mojo people see the light and support Arch officially once they see there is a) interest and b) it's trivial to add support if you ship the libs. There's no thumbs-up functionality here, so consider this one.

@david-ragazzi
Copy link

Nice work! By the way, it would be nice an AUR for it... 😅

@johnny-brav0
Copy link

If you're new to arch and have docker installed on your system, then you can simply do

docker pull johnnybravo9/modular_mojo

Run the image and just type mojo in the terminal and there you have it. Without the risk of breaking (I tend to do this a lot) anything on your existing system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment