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

emscriptenStdenv: create writable cache directory #172207

Merged
merged 2 commits into from
May 22, 2022

Conversation

willcohen
Copy link
Contributor

@willcohen willcohen commented May 9, 2022

Description of changes

In the configurePhase of emscriptenStdenv, create a subdirectory that can be used for the internal emscripten cache. Fixes #139943 and #170621.

Issue broke zlib with the update to 3.0 in #149083.

Additionally this modified the derivation for zlib to just use the emscriptenStdenv configure phase, and then adds the same changes to the other derivations that make larger modifications.

@arximboldi @busti
@qknight @matthewbauer

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@willcohen
Copy link
Contributor Author

Additionally, referencing ZHF: #172160

@willcohen
Copy link
Contributor Author

willcohen commented May 9, 2022

nixpkgs-review is failing to build anything new but using nix-build $NIXPKGS emscriptenPackages.zlib, .libxml2, .json_c shows successful builds for me. .xmlmirror has more failures but that appears to involve the derivation being a little more brittle, which will require some more tweaks.

@arximboldi
Copy link
Contributor

This is great, thank you so much @willcohen !!

@willcohen
Copy link
Contributor Author

@NixOS/release-engineers
I know that this doesn't technically reduce the red number on hydra since emscripten packages don't seem to build there automatically , but it does still seem in the spirit of ZHF to fix the build of at least 3 of the 4 emscriptenPackages, since they've all been broken since the upgrade to emscripten 3.

@willcohen
Copy link
Contributor Author

Thank you!

@willcohen willcohen deleted the emscripten-fix branch May 22, 2022 17:52
@pca006132
Copy link
Contributor

Hi, I wonder if it is possible to document this in doc/languages-frameworks/emscripten.section.md, so we will know what to do when we override the configure phase, e.g. for building cmake based projects.

@willcohen
Copy link
Contributor Author

See #181363!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/improving-an-emscripten-yarn-dev-shell-flake/33045/1

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.

Emscripten tries to write to /nix/store
5 participants