[Nix-dev] Haskell NG: Still no binaries

Peter Simons simons at cryp.to
Thu Apr 16 21:34:32 CEST 2015


Hi Ertugrul,

 >> Might it be the case that you are running nix in daemon mode and thus it
 >> ignores `binary-caches`?
 >
 > That did it!  Since I'm running NixOS I am indeed running nix-daemon.
 > The following setting did the trick:
 >
 >     nix.binaryCaches = [
 >         "https://cache.nixos.org/"
 >         "https://hydra.nixos.org/"
 >     ];

IMHO, "nix-env" should pass those options on to the daemon, i.e. it
should not be necessary to hard-code hydra.cryp.to as a global binary
cache for this to work.

For example, when I run

  $ echo $NIX_REMOTE
  daemon
  $ nix-build --option extra-binary-caches http://hydra.example.org "<nixpkgs>" -A libreoffice --dry-run
  download-from-binary-cache.pl: binary cache ‘http://hydra.example.org’ is not trusted (please add it to ‘trusted-binary-caches’ in /etc/nix/nix.conf)
  these derivations will be built:
  [...]

..., then I get an error message about the untrusted cache that would
make no sense if the daemon wouldn't respect the setting from the
command line.

Just out of curiosity, did you configure

  nix.trustedBinaryCaches = [ http://hydra.nixos.org http://hydra.cryp.to ];

in your configuration.nix?

Best regards,
Peter



More information about the nix-dev mailing list