Open PlotCitizen opened 9 years ago
I'd be happy to take a stab at this.
I believe that cpan is installed in /usr/bin/cpan by default on OSX, and so the installation method of using "sudo cpan Crypt::HSXKPasswd" should work.
No?
@bknowles I haven't tried, but it definitely should work, as you said. However I am a bit cautious to start using CPAN or any other package manager (especially one confined to programs of a specific language, like, in this case, Perl) because that only adds complexity to my existing build, and speaking from past experience will probably be forgotten in a few weeks and linger on my system. That's the reason I would like to see it added to Homebrew, even though I also have no problem compiling and/or running the program as it is currently distributed.
I just installed hsxkpasswd using cpan on Yosemite 10.10.4, and it worked fine. Just take the defaults, and you're good to go.
However, I can see the desire to take that and make it even more fully automated by creating a Homebrew formula to make that process completely invisible to the user.
I'm not sure Homebrew is a good fit here. The terminal command is in fact a Perl script, so you really do need a working Perl environment to run it.
If you like the homebrew mentality of installing stuff into your home dir and leaving the system un-changed, then I would suggest using perlbrew to install the module. This is how I test the module on different versions of Perl.
You can get perlbrew here: http://perlbrew.pl
Once perlbrew is installed, you need to install at least one version of perl, you can see all available versions with: perlbrew available
The latest stable version is 5.22, so I would suggest installing that perl with: perlbrew install perl-5.22.0
(HSXKPasswd works in all versions from 5.16.0 up).
Once you have a perl installed, you need to start using it with a command like perlbrew switch perl-5.22.0
Next you need to enable perlbrew's CPAN client: perlbrew install-cpanm
Finally, use perlbrew's CPAN client to install the module: cpanm Crypt::HSXKPasswd
If someone else wants to do a homebrew recipe, go ahead, but it's not something I feel comfortable providing at the moment, I simply don't have enough homebrew experience.
I just installed hsxkpasswd using cpan on Yosemite 10.10.4, and it worked fine.
Does that also install the "hsxkpasswd" terminal command? If so, where is it?
I think it's quite confusing, would be nice if the steps needed to install and run the terminal command on OS X would be documented somewhere (for normal users, without all kind of kung fu like perlbrew).
Ignore my comment, the problem was caused by a permission problem on my system.
sudo cpan Crypt::HSXKPasswd
works indeed, the script is installed in /usr/local/bin/hsxkpasswd
I use Homebrew exclusively for installing any CLI applications, but aside from the few simple commands I know, getting under the hood and creating the formula myself seems a bit tricky to me.
Being the lead developer, it would be very convenient if you created a formula for HSXKPasswd yourself in order to avoid any errors a formula created by somebody else in the future would have, as well as to help expose HSXKPasswd to more people who may find it useful.
Thanks :blush: