niv icon indicating copy to clipboard operation
niv copied to clipboard

FATAL: Could not read the output of 'nix-prefetch-url'

Open oskin1 opened this issue 4 years ago • 5 comments

When running niv add input-output-hk/haskell.nix -n haskellNix the following output is produced:

Adding package haskellNix
  FATAL: Could not read the output of 'nix-prefetch-url'. This is a bug. Please create a
  ticket:
  
    https://github.com/nmattia/niv/issues/new
  
  Thanks! I'll buy you a beer.
  command: 
  nix-prefetch-url--unpack https://github.com/input-output-hk/haskell.nix/archive/aaf4e230c69507fb3a1c6fe4c1f6603d659d5543.tar.gz --name aaf4e230c69507fb3a1c6fe4c1f6603d659d5543.tar.gz
  stdout: 
  
  stderr: 
  error: secret key is corrupt
  
  FATAL: One or more packages failed to update:
  haskellNix: ExitFailure 1
ERROR: ExitFailure 1

macOS Monterey 12.0, Aarch64

oskin1 avatar Nov 12 '21 15:11 oskin1

niv --version 0.2.19

oskin1 avatar Nov 12 '21 15:11 oskin1

Hi! Could it be an issue in your nix configuration?

nmattia avatar Nov 15 '21 09:11 nmattia

Hi! Could it be an issue in your nix configuration?

Nope, here is my /etc/nix/nix.conf

trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
substituters = https://cache.nixos.org https://nixcache.reflex-frp.org https://hydra.iohk.io
build-users-group = nixbld

oskin1 avatar Nov 15 '21 16:11 oskin1

I see. It definitely looks like a nix issue (in particular nix-prefetch-url) more than a niv issue. I suggest opening a ticket here, they'll be able to help!

nmattia avatar Nov 19 '21 10:11 nmattia

Thanks! https://github.com/NixOS/nix/issues/5614

oskin1 avatar Nov 20 '21 08:11 oskin1