[Feature request] opam install --global-bin #4390
Labels
KIND: FEATURE WISH
KIND: PLUGIN CANDIDATE
Feature requests that might best be implemented as plugins to opam
While writing/releasing https://github.com/kit-ty-kate/waylaunch I realized that there isn't a simple way to use opam for software that need to be installed system-wide. In my case I need
waylaunch
to be installed in /usr/local/bin (or similar according to your system preferences) as it is quite critical to be able to execute it at all times, even if I remove the switch I used to install it, if one upgrade failed, or simply switch current switch. For these reasons symlinks or extending thePATH
to include the opam switch does not work.Similar issues have been opened for this:
However in this issue I try to propose a simple solutions for packages distributing executables like me, and that is to add a
--global-bin
option toopam install
.This would work in the following manner:
opam install --global-bin <pkgs>
would install the packages in the current switch as usualsudo
mode.opam install --global-bin
is called on them, just do points 2, 3 and 4.Here is a visual representation of what it would look like:
I hope my proposal is simple enough to not be too much of a hassle internally.
The text was updated successfully, but these errors were encountered: