Network (sandbox?) problems during install
Opened this issue · 5 comments
I get this far:
$ git clone git@github.com:tweag/blog-resources.git
$ cd blog-resources/monad-bayes-series/
$ nix-shell
these derivations will be built:
/nix/store/20hirzhz0i127yzxmajc4lcybm0q5fkb-ihaskell-0.9.1.0.drv
/nix/store/j73z0ladyq4yrw38m55k5pn7d4m9hcha-statistics-0.15.0.0.drv
/nix/store/rx3mwb7zpds9k6ir5rzvfj3lcjxngd45-ihaskell-hvega-0.2.0.3.drv
/nix/store/sibyb0yi8saw8bla0an844qza2d21xi4-monad-bayes-0.1.0.0.drv
/nix/store/g49j5s00kn2yknv1g8151hs9ibf4ja48-ghc-8.4.4-with-packages.drv
/nix/store/x0k9rww61qayljywdb4pyncxasmdb4al-ihaskell.drv
/nix/store/26gr83zalnkrfjhciqdfxm3fnnbzhzr0-ihaskell-kernel.drv
/nix/store/5x3wj8zijkffvwrrd7f39c88p5k5b8gg-jupyterlab-extended.drv
/nix/store/9xbbdf7hcgh6sxil2vg6f1js6gfx8gjm-python3.7-jupyterlab-0.35.4.drv
building '/nix/store/5x3wj8zijkffvwrrd7f39c88p5k5b8gg-jupyterlab-extended.drv'...
building '/nix/store/20hirzhz0i127yzxmajc4lcybm0q5fkb-ihaskell-0.9.1.0.drv'...
building '/nix/store/j73z0ladyq4yrw38m55k5pn7d4m9hcha-statistics-0.15.0.0.drv'...
setupCompilerEnvironmentPhase
Build with /nix/store/rd5iasc26rbi07zmn41krzbpigk8ahzy-ghc-8.4.4.
unpacking sources
unpacking source archive /nix/store/9b8j5vbg94kz2cglzpdy73m2ysic5yc3-statistics-0.15.0.0.tar.gz
source root is statistics-0.15.0.0
setting SOURCE_DATE_EPOCH to timestamp 1539291821 of file statistics-0.15.0.0/tests/utils/Makefile
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/build/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main ( Setup.lhs, /build/Main.o )
installing
Linking Setup ...
Node v8.15.0
> /nix/store/35gq5y1l3b5fh0nf95h0izwaiyb7yvwi-nodejs-8.15.0/bin/npm pack jupyterlab-ihaskell
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/jupyterlab-ihaskell failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! A complete log of this run can be found in:
npm ERR! /build/.npm/_logs/2019-09-30T13_46_59_160Z-debug.log
Errored, use --debug for full output:
ValueError: "jupyterlab-ihaskell" is not a valid npm package
builder for '/nix/store/5x3wj8zijkffvwrrd7f39c88p5k5b8gg-jupyterlab-extended.drv' failed with exit code 1
cannot build derivation '/nix/store/9xbbdf7hcgh6sxil2vg6f1js6gfx8gjm-python3.7-jupyterlab-0.35.4.drv': 1 dependencies couldn't be built
error: build of '/nix/store/26gr83zalnkrfjhciqdfxm3fnnbzhzr0-ihaskell-kernel.drv', '/nix/store/9xbbdf7hcgh6sxil2vg6f1js6gfx8gjm-python3.7-jupyterlab-0.35.4.drv' failed
I can access https://registry.npmjs.org/jupyterlab-ihaskell via wget
and the browser. I don't have a proxy.
It has been suggested on IRC that one can only have network access inside a sandbox for fixed-output derivations. So possibly something here is not a fixed-output derivation and this is why it fails?
Yes, jupyter has its internal dependency solver that is very difficult to fix. We have instructions for going around it in the main JupyterWith repo README: https://github.com/tweag/jupyterWith#using-jupyterlab-extensions
Can you try and tell us if that works well?
@turion I expanded the README a bit to include instruction for running the notebook locally: https://github.com/tweag/blog-resources/blob/master/monad-bayes-series/README.md - it would be great to hear your feedback on whether this helps!
I re-encountered monad-bayes
recently and gave this another try. The readme is very good and helped me get past the problem I had here. Thanks!
Some issues I encountered:
This has been renamed to nix.settings.trusted-users
.
I'm surprised this still pulls in python 2.7!
Also, we seem to be using ghc-8.6.5, which is very old. I'm not sure but it seems that GHC is not in the cache anymore and I'm just building it from scratch. Can that be avoided by updating to a newer GHC which is in the nixos cache?
I re-encountered
monad-bayes
recently and gave this another try. The readme is very good and helped me get past the problem I had here. Thanks!Some issues I encountered:
This has been renamed to
nix.settings.trusted-users
.I'm surprised this still pulls in python 2.7!
Also, we seem to be using ghc-8.6.5, which is very old. I'm not sure but it seems that GHC is not in the cache anymore and I'm just building it from scratch. Can that be avoided by updating to a newer GHC which is in the nixos cache?
Apologies, it seems I'm just building ghc-parser
from scratch. Still, it would be great to update GHC.