nmattia / niv

Easy dependency management for Nix projects
https://github.com/nmattia/niv
MIT License
1.52k stars 74 forks source link

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

Open oskin1 opened 2 years ago

oskin1 commented 2 years ago

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 commented 2 years ago

niv --version 0.2.19

nmattia commented 2 years ago

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

oskin1 commented 2 years ago

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
nmattia commented 2 years ago

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!

oskin1 commented 2 years ago

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