Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
emscripten toolchain #16208
THIS MAJORED NOW INTO A PULL REQUEST
what is this?
this branch contains a emscripten based toolchain for nix.
TODOs left until merge request:
xmlmirror's nix-shell build environment fails currently, no idea what causes this:
why can't i move the autoreconfHook dependency from
nativeBuildInputs = [ emscripten ] ++ nativeBuildInputs
works with this:
You need this part from libz for it to build for some reason on Darwin:
Here's the error I'm getting from
There should be some documentation on this emscripten packages and whether there are any package hooks to using emscripten to be concerned about. My experiments with this shows that when using something like
As usual with emscripten, there are no shared objects, hence there is nothing in
However there is a static library:
The pkg-config supplied in
Which doesn't mention the static directory at all, which I think means that uses of package config won't result in finding the necessary static library.
Overall I'm still not entirely sure how you're meant to build an emscripten package that relies on nixpkgs emscriptenPackages.zlib instead of using the zlib port (which does a remote download, which is bad). I suppose one could use the
Further reading has led me to this: emscripten-core/emscripten#2486 Basically any generated package config files when using buildEmscriptenPackage/emscriptenStdenv should follow those standards.
referenced this pull request
Sep 2, 2017
Hi. I am not a nix expert, so please forgive if this question does seem too naive. I think it's great somebody started to bring packages for emscripten in. I do however wonder why it does not take the route other cross compiling takes in nixpkgs. Shouldn't "wasm" just be another targetPlatform as described here: https://nixos.org/nixpkgs/manual/#chap-cross ? What would be needed for this? Is this the right place to discuss this?