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

[help] Assets folder for bevy engine #225

Open
ghost opened this issue Jan 17, 2022 · 5 comments
Open

[help] Assets folder for bevy engine #225

ghost opened this issue Jan 17, 2022 · 5 comments

Comments

@ghost
Copy link

ghost commented Jan 17, 2022

Assets folder doesnt get copyed into build env.

@lithdew
Copy link

lithdew commented Jan 24, 2022

I've encountered the same issue building projects that include the bytes of files into their source code using include_bytes!, as the files themselves get removed from the source tree in amidst the build phase.

Did you manage to find any workaround to this?

@ghost
Copy link
Author

ghost commented Jan 24, 2022 via email

@ry755
Copy link

ry755 commented Aug 19, 2022

I'm also running into this issue with my project that uses include_bytes!, it would be great if there was a way to specify extra files/folders that would get copied into the build environment.

@Patryk27
Copy link
Contributor

Hi, I've just checked it and include_bytes!() seems to be working correctly on current Naersk; would you mind checking again on your side and posting some failing code, if it still doesn't compile?

As for the assets, I'd recommend using a postInstall hook - something in terms of:

naersk.buildPackage {
  # ...

  postInstall = ''
    ln -s ${./assets} $out/assets
  '';
}

@ry755
Copy link

ry755 commented Aug 20, 2022

After doing some experimenting I found out that Nix's nix build command only seems to copy the contents of the git repo, not the actual contents of the source directory. The file used in my include_bytes! macro call doesn't actually exist in the git repo, it's a built binary file that is placed there by the user. I found that if I git add that file before running nix build, then it works properly.

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

No branches or pull requests

3 participants