Hi Guix! I have a proposal:
It would be cool to offer gentoo like use-flags for guix as a third-party guix library.
See here for attempts in nixpkgs to get something similar upstream:
https://github.com/NixOS/nixpkgs/issues/12877
https://discourse.nixos.org/t/gentoo-like-use-flags/2210
I think this would be a perfect use case to put in practice the guix thesis and to showcase the freedom of extensibility it offers users without disrupting upstream project directions. For example, the guix-use-flags library could be offered in a guix channel.
guix-use-flags would allow users to add global filters to packages triggering rebuilds under those filters (e.g. disable sound, disable gui/xorg across all packages, etc...)
USE="ldap mbox sasl imap apache2 -png -jpeg -X -kde -gnome -gtk -gtk2 -gif -qt -opengl php -truetype"
would translate to a guix api as:
(use-flags '(ldap mbox sasl imap apache2 -png -jpeg -X -kde -gnome -gtk -gtk2 -gif -qt -opengl php -truetype))
I imagine this can be a global configuration setting that could be implemented via macros to rewrite (package ... '(#:configure-flags ... with the appropriate flags across all stated packages in a system configuration.
I think this would be especially useful for configuring guix system servers.
What are your thoughts on this? Is there an alternative way to do what I have described above that I am not thinking of?