问HN:是什么阻止了Guix为各种目标构建静态二进制文件?
Guix可以通过`guix build --target <arch>`为各种不同的目标构建,此外,它还可以构建整个链接库,并通过`guix pack --target <arch>`将其打包为tarball以部署到目标机器上……但它无法做到Nix可以可靠完成的一件事,那就是生成一个单一的静态二进制文件。
是什么阻碍了它呢?
许多软件包是使用`(build-system gnu-build-system)`宏编写的。
添加一个`(build-system gnu-build-system 'static)`参数有多难呢?这个参数会改变配置步骤,使其使用`-static`标志。
查看原文
Guix can build for various different targets using `guix build --target <arch>`, and it can build entire linked libraries that can be deployed as a tarball to a target machine via `guix pack --target <arch>`...<p>But it can't do the one thing that Nix can do reliably and that is produce a single static binary.<p>What is stopping it?<p>Many packages are written using the `(build-system gnu-build-system)` macro.<p>How hard is it to add a `(build-system gnu-build-system 'static)` parameter, that changes the configure step to use the `-static` flag?