Unknown hash algorithm ''

Recently, a Haskell build job has started failing: https://travis-ci.org/github/sebastiaanvisser/clay/jobs/693190286

The crucial part seems to be:

$ nix-env --version

nix-env (Nix) 2.0.4

$ nix-instantiate --eval -E 'with import <nixpkgs> {}; lib.version or lib.nixpkgsVersion'


0.98s$ nix-build

error: unknown hash algorithm '', at /nix/store/fhksmnm8dk9b1hs99sfzha4nwvpfs86n-nixpkgs-20.09pre227892.b27a19d5bf7/nixpkgs/pkgs/build-support/fetchurl/default.nix:119:3

(use '--show-trace' to show detailed location information)

The command "nix-build" exited with 1.

When I try to reproduce locally, everything is fine:

$ nix-env --version
nix-env (Nix) 2.3.3

$ nix-build
these derivations will be built:

This succeeds without errors.

Note that it seems that my Nix version is newer.

cc @domenkozar @garbas