This is a move-over of NixOS/nixpkgs#24575 from nixpkgs, which turned out to be a nix issue.
When you use filterSource (...) ./., nix puts the basename of the current dir, that is, the name of the parent directory, into the derivation.
That is problematic because that could be gnu-hello or gnu-hello-myclone or /tmp/asdf123 etc (see #904 for more such problems).
I think that filterSource should not rely on the basename here.
The easiest solution would be to just use the hash and not try to make up a nice extra name.