deadnix icon indicating copy to clipboard operation
deadnix copied to clipboard

Provide a statically linked package

Open jzbor opened this issue 1 year ago • 3 comments

I noticed that my CI takes a lot of time downloading dependencies for deadnix (namely libgcc, glibc and their dependencies). I think this could be avoided by using a binary that is statically linked against musl. Ideally this could be provided as a flake output.

jzbor avatar Sep 03 '24 16:09 jzbor

Though I got rid of naersk, I am failing to build with pkgsCross.musl64.pkgsStatic.

Cross-building deadnix from nixpkgs works, however. Would you like me to switch deadnix-action to that?

astro avatar Sep 06 '24 23:09 astro

I didn't even know of deadnix-action. Currently I use deadnix from nixpkgs, so just using that might work. One thing is, that it will not be cached like the default package.

I think the best solution would be a deadnix-static package so it could make use of the public binary cache, but I think this might not align with nixpkgs packaging guidelines.

jzbor avatar Sep 09 '24 06:09 jzbor

So I have now successfully created a static build with crane. Sadly however the benefit seems to be negated by the usage of flakes, as their download takes almost as long as downloading libc + dependencies (see here).

jzbor avatar Sep 23 '24 09:09 jzbor