Dear Neil, Thanks for the tip. In the log I found out the reason. It was because that I enabled nix but did not make the environment impure. By adding pure: false the problem is resolved.
Regards, Guanpeng Xu On Monday, January 15, 2018 at 5:48:30 AM UTC+8, Neil Mitchell wrote: > > Hi Guanpeng, > > Does it fail if you run without the proxy set? If so, can you paste a > trace with --verbose which includes the failure message? Generally, > the Haskell http library used by both Stack and Hoogle takes care of > http_proxy for you automatically so it's surprising that something > isn't picking it up. > > Thanks, Neil > > > On Sun, Jan 14, 2018 at 3:17 PM, Guanpeng Xu <herber...@gmail.com > <javascript:>> wrote: > > Hello, > > > > I want to use stack hoogle through a proxy. Here is what I tried: > > > > $ ~/.local/bin/stack --version > > Version 1.6.3, Git revision b27e629b8c4ce369e3b8273f04db193b060000db > (5454 > > commits) x86_64 hpack-0.20.0 > > > > $ env | grep proxy > > https_proxy=socks5h://127.0.0.1:12800 > > http_proxy=socks5h://127.0.0.1:12800 > > no_proxy=127.0.0.1,localhost > > > > $ ~/.local/bin/stack hoogle > > Hoogle isn't installed. Automatically installing (use --no-setup to > disable) > > ... > > Minimum version is hoogle-5.0. Found acceptable hoogle-5.0.16 in your > index, > > installing it. > > > > Meanwhile these were the connections: > > > > $ sudo netstat -nalp | grep stack > > tcp 0 1 192.168.0.102:34104 54.231.120.226:443 > SYN_SENT > > 22075/stack > > tcp 0 1 192.168.0.102:34106 54.231.120.226:443 > SYN_SENT > > 22075/stack > > tcp 0 1 192.168.0.102:34108 54.231.120.226:443 > SYN_SENT > > 22075/stack > > tcp 0 1 192.168.0.102:34100 54.231.120.226:443 > SYN_SENT > > 22075/stack > > tcp 0 1 192.168.0.102:34102 54.231.120.226:443 > SYN_SENT > > 22075/stack > > tcp 0 1 192.168.0.102:34110 54.231.120.226:443 > SYN_SENT > > 22075/stack > > tcp 0 1 192.168.0.102:34098 54.231.120.226:443 > SYN_SENT > > 22075/stack > > tcp 0 1 192.168.0.102:34112 54.231.120.226:443 > SYN_SENT > > 22075/stack > > > > It seems that the env vars were not respected. How to use proxy with > stack > > hoogle? > > > > Regards, > > Guanpeng Xu > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "haskell-stack" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to haskell-stac...@googlegroups.com <javascript:>. > > To post to this group, send email to haskel...@googlegroups.com > <javascript:>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/haskell-stack/263843f5-fabb-44be-b18a-0ea11c1a413b%40googlegroups.com. > > > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "haskell-stack" group. To unsubscribe from this group and stop receiving emails from it, send an email to haskell-stack+unsubscr...@googlegroups.com. To post to this group, send email to haskell-stack@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/d01c18de-5d3c-41d3-9254-df9cbb285fd9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.