Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: pkgsEmscripten: emscripten package set using cross toolchain #59784

Closed
wants to merge 1 commit into from

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Apr 17, 2019

Implement the emscripten package set using the cross toolchain in a similar
way as pkgsMusl.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Implement the emscripten package set using the cross toolchain in a similar
way as `pkgsCross`.
@FRidh
Copy link
Member Author

FRidh commented Apr 17, 2019

Unfortunately I'm getting an evaluation error. @dtzWill the structure is now roughly based on pkgsMusl. Could you have a look at it? I suppose it's related to the splicing.

@matthewbauer
Copy link
Member

Looks okay. TBH I'd like everybody to use WASM/WASI, but I suppose it's nice to work with emscripten as it's more popular. emconfigure and emmake are mostly just a collection of hacks, so the likelihood of working with many packages out of the box is not great.

buildInputs = [ emscripten python ] ++ buildInputs;
nativeBuildInputs = [ emscripten python ] ++ nativeBuildInputs;
# name = "emscripten-${args.name}";
buildInputs = (args.buildInputs or []) ++ [ emscripten python ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These won't cross compile

{
stdenv = super.stdenvAdapters.emscriptenAdapter super.stdenv;

json_c = super.json_c.overrideDerivation (old: {
nativeBuildInputs = [ autoreconfHook pkgconfig ];
propagatedBuildInputs = [ zlib ];
buildInputs = old.buildInputs ++ [ automake autoconf ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here.

@matthewbauer
Copy link
Member

It would also be good to update emscripten. I believe it's a little bit out of date.

@FRidh
Copy link
Member Author

FRidh commented Apr 17, 2019

I'd like everybody to use WASM/WASI

I agree with you. Right now, I just want to see if we can get pyodide running.

@FRidh
Copy link
Member Author

FRidh commented May 18, 2019

I won't continue with this.

@FRidh FRidh closed this May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants