Closed nomeata closed 2 years ago
I'd love to try this out, but I know absolutely nothing about nix... What is missing from my system here?
$ nix-shell -p haskell.compilers.ghcjs
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
How did you install nix
? Maybe the installation configured your environment to set NIX_PATH
, but you need to re-login for that to take effect?
In any case, this should work:
nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/09c32b0bda4db98d6454e910206188e85d5b04cc.tar.gz -p haskell.compiler.ghcjs
(This is not the most principled way of setting up an environment like this, but one of the fastest one.)
Hmm, it looks like ghcjs is not actually provided by the Nix cache, so this will not only download a bunch of stuff, but also build a bunch of stuff for a while … once you see it doing something, maybe just let it sit there over lunch or so :)
When you come back you should be in a shell with ghcjs
installed.
OK I'll try that once I'm over an annoying flu...
Do you have a rough estimate of how much disk size building all of GHCJS via Nix will require?
How did you install
nix
?
I don't remember doing anything special other than installing it from an Ubuntu .deb
.
I don't remember doing anything special other than installing it from an Ubuntu .deb.
Hmm, then I guess that package does not set up the environment as the official nix installer does.
Do you have a rough estimate of how much disk size building all of GHCJS via Nix will require?
Hard to predict, but I hope 10-20GB ought to be enough :-D
This got marked as 'merged' by accident, and now I don't know how to reopen it...
This compiles and seems to work:
I am not sure how idiomatic that is, and if I may be doing something really stupid performance wise.
Also I had to jump through quite a few hoops to get a mutable UInt8Array type, and to expose from Haskell a function that returns a value.
You need
ghcjs
somehow.nix-shell -p haskell.compilers.ghcjs
is one way to get it. Thencabal build --ghcjs
works.I did not fully automate the setup, hence leaving this in Draft state.
Also see https://www.reddit.com/r/haskell/comments/vpnh53/comment/ieoktf0/?utm_source=reddit&utm_medium=web2x&context=3