Change:
<del> { stdenv, lib, fetchurl, python, cffi, cryptography, pyopenssl, crcmod, google-compute-engine, makeWrapper }: </del> <ins> # Make sure that the "with-gce" flag is set when building `google-cloud-sdk` # for GCE hosts. This flag prevents "google-compute-engine" from being a # default dependency which is undesirable because this package is # #   1) available only on GNU/Linux (requires `systemd` in particular) #   2) intended only for GCE guests (and is useless elsewhere) #   3) used by `google-cloud-sdk` only on GCE guests # { stdenv, lib, fetchurl, makeWrapper, python, cffi, cryptography, pyopenssl, crcmod, google-compute-engine, with-gce ? false }: </ins> <del> # other systems not supported yet </del> let <del> pythonInputs = [ cffi cryptography pyopenssl crcmod google-compute-engine ]; </del> <ins> pythonInputs = [ cffi cryptography pyopenssl crcmod ] ++ lib.optional (with-gce) google-compute-engine; </ins> pythonPath = lib.makeSearchPath python.sitePackages pythonInputs; <ins> baseUrl = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"; </ins> sources = name: system: { i686-linux = { <del> url = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${name}-linux-x86.tar.gz"; </del> <ins> url = "${baseUrl}/${name}-linux-x86.tar.gz"; </ins> sha256 = "0aq938s1w9mzj60avmcc68kgll54pl7635vl2mi89f6r56n0xslp"; }; x86_64-darwin = { <del> url = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${name}-darwin-x86_64.tar.gz"; </del> <ins> url = "${baseUrl}/${name}-darwin-x86_64.tar.gz"; </ins> sha256 = "13k2i1svry9q800s1jgf8jss0rzfxwk6qci3hsy1wrb9b2mwlz5g"; }; x86_64-linux = { <del> url = "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/${name}-linux-x86_64.tar.gz"; </del> <ins> url = "${baseUrl}/${name}-linux-x86_64.tar.gz"; </ins> sha256 = "1kvaz8p1iflsi85wwi7lb6km6frj70xsricyz1ah0sw3q71zyqmc"; }; }.${system};

Discussion:
make[1]: [Makefile:4480: check-TESTS] Error 1 make[1]: Leaving directory '/home/ryadav/tmp/nix-build-libuv-' make: [Makefile:4737: check-am] Error 2 builder for ‘/home/ryadav/opt/nix/store/m0m8aa3dw0drzbb7m3qk39yabizsk3qm-libuv-’ failed with exit code 2 cannot build derivation ‘/home/ryadav/opt/nix/store/h4d0binr891a8kk60dw7mlhfi7v68hid-cmake-’: 1 dependencies couldn't be built building path(s) ‘/home/ryadav/opt/nix/store/0kdiri183235wxi1a6gdb0ra44brnbm5-libva-’ cannot build derivation ‘/home/ryadav/opt/nix/store/yh0r3zf5liw6k2dpbkqbfx28axi949p1-bullet-’: 1 dependencies couldn't be built killing process cannot build derivation ‘/home/ryadav/opt/nix/store/ldz45dl65rcld3z6bvny46idhlg4h4ax-doxygen-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/hrri3rylg03330yq9lxymczkc5gnrj46-graphite2-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/a419jg1w437izxvgds8a53azxrghdlpz-jasper-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/p0igsf2g63ibhnaqdk68jv7wqqkv827b-llvm-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/7cc9v9wlvczmqcfxzmy714rrajbq9hqz-openjpeg-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/qxf5q49j3spsgbjz1n59w71c1mr9dmps-openjpeg-’:

1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/9bmxxj3c9gb8nvl56wx12hqb54d6wrfj-soxr-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/0cq3rwbjmcscc6l08fqc1nd3sjpn6ay8-taglib-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/1prjar4c213ivaclhv5lz6c156b3mi4v-x265-’: 1 dependencies couldn't be built cannot build derivation ‘/home/ryadav/opt/nix/store/4d5c520win02fgcaljn9zz5hmy7v8kh4-efl-’: 1 dependencies couldn't be built building path(s) ‘/home/ryadav/opt/nix/store/jy231v7bl25766pbqfk6ksxxg5vl05h3-terminology-’ killing process cannot build derivation ‘/home/ryadav/opt/nix/store/zighwipwxwwjxjbsnfaykca3iwv5f1sr-terminology-’: 1 dependencies couldn't be built error: build of ‘/home/ryadav/opt/nix/store/zighwipwxwwjxjbsnfaykca3iwv5f1sr-terminology-’ failed I am trying to build terminology and several other packages in non-default nix-store. However, libuv derivation seems to have conflict. I do not know how to override this and continue building. ubuntu: 17.04 nix-env (Nix) 1.11.15 03pre118668.
Your output doesn't show the actual error. That would be above, or you can retrieve it by Using sandboxing might help to avoid (many) errors if you build yourself, but I understand it's harder to set up on non-NixOS...
From I guess the build was done but it failed in the tests. Apparently those tests were known to fail randomly on Darwin before...
Actually, there is some issue with my network. However, if I try to build inside an lxc container, then it builds fine.