Closed gotjoshua closed 4 years ago
Hi @gotjoshua yeah, this is puzzling -- I'm pretty sure curl
was in the nix shell at one point, and now it isn't. It's necessary for installation anyway, so maybe the install instructions should just tell you where to find it.
Well, yeah, i'd say temporary solution is to add the above commands to the install/tutorial. But if I understand it correctly holochain.love decides what is preinstalled in it's shell... so it ought to already take care of this (independent of the core nix shell)
@gotjoshua for sure, yeah, it'd be a nice courtesy for us to include dev tools like curl. I'm thinking, though, that because it's a prerequisite (it's how you install nix in the first place, after all) and because it's annoying to have to move out of your comfy envirnoment into a nix environment just to run curl, maybe we should make sure curl is installed for everyone.
Hey @pdaoust, thanks for all your replies!
I am not sure if i understand nix shell well enough, but if i have curl installed on the host machine, and i am working inside a holochain.love nix shell that does not have curl... will/should i be able to use the curl command from the nix-shell command line?
It all boils down to paths. In majority of default configurations, if you can execute binary outside of the nix-shell you should be able to execute it inside as well. The best thing to do is to just check.
First outside of nix-shell run which curl
that will give you a full path to curl
binary (e.g. /usr/bin/curl
). Then enter the nix-shell and print your PATH with echo $PATH
. If you see curl
's path in your PATH then you're all set. If not then you have to add it with help of e.g. ~/.profile
file that nix-shell sources at the start.
@peeech, understood.
I still hold to the opinion that the holochain.love nix shell should contain all binaries needed to complete the tutorials (i guess curl is not a massive extra overhead). But I think we can close this issue and the maintainers can decide if they agree enough to implement it.
Thanks for the exchange...
@gotjoshua oh, that's some very good feedback actually -- I was thinking of holonix as "everything necessary for an app dev to get started", but that kinda includes being able to learn Holochain in the first place, which means being able to get through the tutorials too. I'm pretty sure holonix used to include curl; I've created a ticket on the Holonix repo to (re?) include it.
Page URL: http://developer.holochain.org/docs/tutorials/coreconcepts/hello_holo/
The curl command fails because curl is not installed: curl -X POST -H "Content-Type: application/json" -d '{"id": "0", "jsonrpc": "2.0", "method": "call", "params": {"instance_id": "test-instance", "zome": "hello", "function": "hello_holo", "args": {} }}' http://127.0.0.1:8888
you need three commands to install it:
but actually, i guess it should be installed in the holochain.love shell so that the tutorial finishes a bit stronger ; -D