-
Notifications
You must be signed in to change notification settings - Fork 163
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
Support for Static Linking on Desktop #690
Comments
In theory, this shouldn't be too hard, and I'm pretty sure some people have done it. You could try using One intermediate step that should definitely work straightforwardly would be to use Nix on non-NixOS hosts. This should already be fully supported on Linux and MacOS. |
So for what it's worth, I'm not actually developing on NixOS, but rather an Ubuntu based Linux and it's dynamically linking gtk to the nix store. So if it is supported, I'm clearly doing it wrong. What does it mean to "use justStaticExecutables"? |
See here for example: https://github.com/srid/neuron/blob/746eccc636ca2bca557154c3c3e687aadf97e614/project.nix#L59 It doesn't build a full static binary though, as the resulting binary will still link to core system libraries like libz. I believe what we need is NixOS/nixpkgs#43795 |
In genera, I'm OK with partial static compilation. Dynamic dependencies on libz and glibc don't bother me. I'm more concerned about dynamic dependencies on gtk, which there is no reason to believe a user would have on their own. The project I'm making I'd like to make reasonably portable (even to Windows/Mac) and not to have to package it with nix in order for it to work properly. I'd be willing to use reflex without nix in order to accomplish that but my attempts to do so have been thwarted on multiple occasions. Stack doesn't work very well here due to the reflex libraries not building properly with only adjustments to As far as going straight cabal (no stack, no nix), I'm intimidated by cabal hell and haven't read enough of the cabal manual yet to know how to approximate stack's behavior using sandboxes. I'm fully aware that my inability to do this is tied to myself being a n00b at non-stack builds for Haskell. But I'd imagine lowering the barrier to being able to do such things is within the scope of goals for reflex-platform. |
It's really cool that I can build an app that compiles to native via webkitgtk, but I also can't use it outside of NixOS because the executable is dynamically linked against the nix store. I'd like to be able to statically link everything except for glibc. It seems that the approach has been that desktop is a fast way to test front ends, but I actually want it to work this way as the end product. Would this be hard to accomplish?
The text was updated successfully, but these errors were encountered: