juspay / nix-health

REPO MOVED https://github.com/juspay/omnix/tree/main/crates/nix_health
https://github.com/juspay/omnix/tree/main/crates/nix_rs
28 stars 2 forks source link

Produce a static binary #13

Open srid opened 2 months ago

srid commented 2 months ago

There are situations where it may not be realistic to ask the user to nix run this program, viz.: missing cache.nixos.org (wherein the whole world compiles).

Let's provide a static binary for macOS to begin with.

shivaraj-bh commented 2 months ago

It is easy on linux:

nix build github:shivaraj-bh/nix-health/static-linux
ldd ./result/bin/nix-health

But in macOS, last I remember you cannot produce a fully static binary, the system libraries are always going to remain dynamic.

srid commented 1 month ago

@shivaraj-bh Could you open a PR for your branch? Let's get it into main even if it is only for Linux.

the system libraries are always going to remain dynamic.

Which is fine, as long as it generally works on current macs. We can always provide both packages in the flake.

shivaraj-bh commented 1 month ago

https://github.com/juspay/nix-health/pull/23

^ for linux static executable