Nixpkgs: Can't use Haskell stack to create a new project on Ubuntu

Created on 21 Apr 2018  路  4Comments  路  Source: NixOS/nixpkgs

Issue description

There appears to be a network issue of some sort, and due to past experiences with e.g., curl, I wonder if it is SSL related (though it doesn't appear to be):

$ stack new LearningHaskell
Downloading template "new-template" to create project "LearningHaskell" in LearningHaskell/ ...

Warning: Retry number 0 after a total delay of 0 us
         If you see this warning and stack fails to download, but running the command again solves the problem, please report here:
         https://github.com/commercialhaskell/stack/issues/3510

Warning: Retry number 1 after a total delay of 100000 us
         If you see this warning and stack fails to download, but running the command again solves the problem, please report here:
         https://github.com/commercialhaskell/stack/issues/3510

Warning: Retry number 2 after a total delay of 200000 us
         If you see this warning and stack fails to download, but running the command again solves the problem, please report here:
         https://github.com/commercialhaskell/stack/issues/3510

Warning: Retry number 3 after a total delay of 300000 us
         If you see this warning and stack fails to download, but running the command again solves the problem, please report here:
         https://github.com/commercialhaskell/stack/issues/3510
HttpExceptionRequest Request {
  host                 = "raw.githubusercontent.com"
  port                 = 443
  secure               = True
  requestHeaders       = []
  path                 = "/commercialhaskell/stack-templates/master/new-template.hsfiles"
  queryString          = ""
  method               = "GET"
  proxy                = Nothing
  rawBody              = False
  redirectCount        = 10
  responseTimeout      = ResponseTimeoutDefault
  requestVersion       = HTTP/1.1
}
 (ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp))

Steps to reproduce

I just installed stack using nix-env, see above for how to reproduce.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.13.0-38-generic, Ubuntu, 16.04.3 LTS (Xenial Xerus)
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 1.11.16
  • channels(brandon): "nixpkgs-18.09pre137305.d91caac6c3e, nixos-18.09pre134828.62dc989963c"
  • nixpkgs: /nix/var/nix/profiles/per-user/brandon/channels/nixpkgs
 $ stack --version | head
Version 1.6.5 x86_64
Compiled with:
- Cabal-2.0.1.0
- Glob-0.9.2
- HUnit-1.6.0.0
- QuickCheck-2.10.1
- StateVar-1.1.0.4
- aeson-1.2.4.0
- aeson-compat-0.3.7.1
- annotated-wl-pprint-0.7.0
stale haskell

Most helpful comment

The nixos-equivalent is iana-etc

All 4 comments

This works for me on NixOS. I'll try my Ubuntu VM later.

After running into this again elsewhere, I saw https://github.com/bos/wreq/issues/5#issuecomment-108086543

The workaround is to install apt install netbase; not sure what the equivalent nixos package is yet.

The nixos-equivalent is iana-etc

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

grahamc picture grahamc  路  88Comments

ThomasMader picture ThomasMader  路  65Comments

ttuegel picture ttuegel  路  98Comments

nico202 picture nico202  路  70Comments

globin picture globin  路  65Comments