"Бойцов, Вася" <vasiliy.boyt...@phystech.edu> writes:
> Hello, I would like to make Guix more comfy for me (and maybe others) > I have some questions: > 1. Can one build system with selected CFLAGS? > 2. Is it possible to provide virtuals (package subtitiutions f.e. > toybox/busybox/etc)? > 2.1. I would love to rebuild my system with libressl system-wide, what > should I do? > 3. is there an option to make optional build-time dependencies in a package? > 4. How can one create a rule to make some of the selected packaes static? > 5. I want to extract ./configure --help from packages, how could I achieve > that? I don't have all the answers, but you might find the following blog post relevant - it explains in detail how one might customize a package: https://guix.gnu.org/blog/2018/customize-guixsd-use-stock-ssh-agent-everywhere/ I think it might help answer questions 2, 3, and 4. For compiling packages statically, in my experience you generally need to create a custom package definition. Often, you can "inherit" from an existing package, and just change the things that matter (e.g., configure flags). There are some procedures in the Guix source code which attempt to make the appropriate modifications to a package in order to generate a static version (e.g., static-package in guix/build-system/gnu.scm), but in practice I've found that some packages require are idiosyncratic and require some extra work. In any case, you "just" need to alter the package definition to set configure flags appropriately, set make variables appropriately, or set environment variables appropriately. For example, sometimes all you have to do is set LDFLAGS=-static. I don't have a good example, though, I'm afraid. Try grepping the Guix source for the word "static". I realize that doesn't answer all your questions, but hopefully it's a good start! Good luck. -- Chris
signature.asc
Description: PGP signature