In a user namespace, sending credentials for an unmapped user return
EINVAL instead of EPERM. So handle that case.
http://hydra.nixos.org/build/44839000
(cherry picked from commit 1dd0fb6b5a7c44d1b632466f936ca74268d13298)
The darwin stdenv currently provides clang-3.7; however,
a) go-1.7 currently expects a compiler that supports "-fdebug-prefix-map"
arguments (which clang-3.8 supports but clang-3.7 does not) and
b) even with clang-3.8, go-1.7 misinterprets the result of its runtime probes
for support for the "-no-pie" flag, thereby failing to build runtime/cgo.
This patch resolves (a) by building go-1.7 with clang-3.8 and resolves (b) by
teaching go how to correctly probe "-no-pie" error messages from clang.