Hi, I am another NixOS maintainer.

Yes, it is true that ?= in makefiles is somewhat rare, and that we can work 
around this other ways. But it was I who proposed the ?= change on our side[1], 
so let say why I think it's the right choice:

Most C packages don't use "?=" and do
 FOO ?= foo
but instead do have a configure script, so they do
 FOO = @FOO@
with regular "=". However that configure script *does* silently consume 
environment variables, so the effect is the same.

I wouldn't request upstream add a configure script is nothing is needed, and I 
don't even like the implicitness of environment variables myself. But the fact 
is it is the standard for distros to communicate information to all the myriad 
build systems[2], so I advocate this change so distros can remove extra 
packaging hacks.

The variable we need to override is PKG_CONFIG. One may right point out that 
other distros don't rename pkg-config, but that's because most derivations 
don't support cross compilation. NixOS does, but NixOS is not the only one: See 
also Exerho and their dnsmasq packaging[3] which has the same workarounds. We 
hope that cross compilation becomes less niche, but that means more people and 
projects will be affected by these sorts of things.

Thanks for your consideration,

John

P.S. Sorry I am missing the right "in-reply-to"; I turned on message delivery 
after the original emails were sent, and do not know how to get the message-id 
from the pipermail archive.

[1]: https://github.com/NixOS/nixpkgs/pull/91422
[2]: Meson (e.g. see 
https://mesonbuild.com/Reference-tables.html#compiler-and-linker-flag-environment-variables)
 is a good example of grudgingly supporting environment variables just for this 
reason.
[3] 
https://gitlab.exherbo.org/exherbo/arbor/-/blob/master/packages/net-dns/dnsmasq/dnsmasq-2.80-r3.exheres-0#L68

_______________________________________________
Dnsmasq-discuss mailing list
[email protected]
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to