nix: fix generation of compiler attribute
nix: fix generation of compiler attribute

We only want to filter the version, not the whole name. Otherwise, we end
up with things like "haskellpackagesghc7103" which is of course nonsense.

Also, when the stack.yaml file only specifes a major ghc version (like 7.10), we
need to supply a minor version so that we can look up the correct compiler in
nixpkgs.

deech/stack,MichielDerhaeg/stack,AndrewRademacher/stack,sjakobi/stack,Heather/stack,AndreasPK/stack,Blaisorblade/stack,Heather/stack,mrkkrp/stack,juhp/stack,sjakobi/stack,mrkkrp/stack,MichielDerhaeg/stack,AndrewRademacher/stack,anton-dessiatov/stack,Fuuzetsu/stack,Fuuzetsu/stack,Blaisorblade/stack,deech/stack,juhp/stack,martin-kolinek/stack,anton-dessiatov/stack,AndreasPK/stack,martin-kolinek/stack