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

add nix flake build #139

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

add nix flake build #139

wants to merge 13 commits into from

Conversation

jakeisnt
Copy link

@jakeisnt jakeisnt marked this pull request as ready for review December 24, 2022 23:21
@ctrlcctrlv
Copy link
Contributor

Is this OK to merge? Looks fine to me.

@jakeisnt
Copy link
Author

jakeisnt commented Dec 25, 2022

Yes and no

The dev shell works perfectly and allows contributors to contribute without installing anything - i. e. 'cargo run' in 'nix shell' works perfectly

Building the package within Nix, though, doesn't work - unfortunately rust-skia uses network access to fetch a pre-compiled Skia version, and to ensure reproducibility, nix disallows network access when building a package. Without fixing this, the 'metadata' build cant be included in the other flake, because it doesn't successfully install skia, and this causes the rest of the build to fail

To solve this, an env variable needs to be set for rust-skia and a skia build has to be 'sideloaded' in; issue here, and an example package with this build can be found in nixpkgs here. I thought this would be a quick fix but ran out of time to get it in today; unfortunately I'm not sure when I'll have time to take another crack at it.

The other flake has the same problem - as of now, the dev shell works perfectly but the nix build fails.

@ctrlcctrlv
Copy link
Contributor

@jakeisnt You can disable that you know. I've had to do it before. Set envvar SKIA_LIBRARY_SEARCH_PATH and/or SKIA_SOURCE_DIR. I had to do this back when @MatthewBlanchard was patching Skia to test his changes to boolean operations.

You can also pass FORCE_SKIA_BUILD to force it to build Skia which is a git submodule of skia-sys crate.

@ctrlcctrlv ctrlcctrlv marked this pull request as draft December 26, 2022 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants