-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[bug] Build is not working on NixOS #3323
Comments
You need to use patchelf or use the hook, or nix-ld to patch linuxdeploy-x86_64.AppImage I'll try to fix your shell file when I get time this weekend. |
That script will also fail to get the libraries, which... why is it getting them from the host system in the first place? o.O The script should also have |
Maybe #4457 fixes this? Please try it tomorrow when we release 1.0.1. |
Probably not. But feel free to ping me and I'll try again |
The I honestly think a bigger issue here is just |
I wonder if something along the lines of https://blog.mediocregopher.com/posts/building-appimages-with-nix could packaged in a nice way for nix. Something like a "build tauri project" derivation. I'm not knowledgeable enough in nix to write this but I think it should be doable. |
Just a note, |
@miniBill This is definitely possible. All you need is a derivation (or a function to create a derivation) to do what you want (build tauri project), then get that derivation into the nixpkgs repository through a pull request. It would then be available for everyone's use. Since the transition to flakes, this isn't even necessary, just have a flake somewhere with the derivations that you want (git repo). These can be included in any other flake. |
I'm pretty new to tauri, but |
Unless this is about building the main repo, haven't tried that yet. |
Just built from the dev branch without any errors. Again, no |
|
I see, well I can confirm that |
Just took a look at That being said, it is possible to get
Which seems to modify the ELF header magic bits so that the appImage can not be identified as an appImage. (why do this?) Removing this line seems to have no detrimental effect as far as I can tell. adding |
@IllustratedMan-code See #4457 for the elf header stuff. |
Interesting, well I'm stumped then. I don't think there is a way to fix this issue without a major rewrite to
It might be possible to sidestep this problem and do it through a nix derivation, maybe using something like https://github.com/matthewbauer/nix-bundle . This would start to get a bit nix-specific though and would probably need its own section of the documentation. This might end up looking like It might be possible to replicate the effects of https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/package-management/appimage-run/default.nix https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/appimage/appimage-exec.sh |
Seems like you could also just run |
@IllustratedMan-code thank you for taking the time to look into that |
In my case, I don't need to build an appimage, so I can work around this issue by configuring the targets. i.e.,
Obviously this is not helpful if you do want an appimage, but just wanted to share in case anyone else is in a similar situation. |
Here I have a package that may help when building tauri into a drv:
|
Describe the bug
The
build_appimage.sh
script invoked bycargo tauri build
fails to run on NixOS because thelinuxdeploy-x86_64.AppImage
always tells meNo such file or directory
.In contrast, the exact same project with the same version of tauri can be build successfully on Ubuntu.
Reproduction
shell.nix
file in the project root and runnix-shell
cargo tauri build
Expected behavior
No response
Platform and versions
Stack trace
Additional context
No response
The text was updated successfully, but these errors were encountered: