17 Oct 2024 |
K900 | I think we need to do it at pkgconfig level | 11:06:33 |
Alyssa Ross | I think upstream would tell you that's part of the design of pkg-config | 11:06:37 |
Alyssa Ross | it's on purpose that these are not absolute paths | 11:06:50 |
emily | we also can't do that with .so s | 11:06:52 |
emily | which we also early-bind more than other distros | 11:07:02 |
emily | it occurs to me that I don't actually know how .override works with propagated inputs. do they magically become faux parameters? | 11:07:17 |
Alyssa Ross | I'm not saying it makes sense to do this in Nixpkgs, but that I think this is how upstream will see it. | 11:07:20 |
K900 | Ideally I think it should be something like libffi=/nix/store/... | 11:07:43 |
emily | ah. well I'm not asking upstream to change any behaviour, I'm just hoping that we can agree on a way to do an opt-in strange thing that we want to do | 11:07:46 |
K900 | So it searches PKGCONFIGPATH first | 11:07:48 |
K900 | So it searches PKG_CONFIG_PATH first | 11:07:52 |
emily | I expect that the patch would be non-invasive, so it would be OK if we have to carry it long-term, but hopefully not | 11:08:05 |
K900 | But has a fallback | 11:08:05 |
emily | (beats the pkg-config patch we currently haveā¦) | 11:08:22 |
Alyssa Ross | searching first and falling back sounds more reasonable to me | 11:08:42 |
emily | sure, that sounds good | 11:08:49 |
emily | we could just have a fallback_pkg_config_path variable or something | 11:09:04 |
emily | in .pc files | 11:09:05 |
emily | that we make pkgconf look at when lookup fails | 11:09:12 |
emily | though I question if we really want to automagically override private dependencies of dependencies just because you included a package that exposes the same .pc in your derivation | 11:09:29 |
emily | it breaks the encapsulation | 11:09:32 |
emily | you're not supposed to know that wlroots uses libffi | 11:09:42 |
emily | but if using libffi-hax in your derivation changes the one wlroots finds, then you have to know that | 11:09:59 |
K900 | But then linking explodes | 11:10:02 |
emily | well, true, we really want .pc files to use absolute paths for that too :') | 11:10:26 |
K900 | WAIT WHAT | 11:10:34 |
K900 | OK hold | 11:10:37 |
K900 | HOLD | 11:10:38 |
emily | and even then there's symbol collisions, of course, nobody does namespacing right | 11:10:39 |
K900 | I just built Cairo on master | 11:10:44 |