| 14 Jul 2025 |
Alyssa Ross | We discussed this three years ago and IIRC you came around to my pkg-config hook change | 14:03:46 |
emily | yeah I am fine with this solution | 14:05:16 |
emily | Alyssa Ross: replaceStrings ["-"] ["_"] is not necessary, it checks both | 14:05:27 |
Alyssa Ross | In reply to @qyliss:fairydust.space We discussed this three years ago and IIRC you came around to my pkg-config hook change Sadly I don't seem to have decryption keys beyond 2023 | 14:05:57 |
emily | there's also a very dubious
pkgs/development/compilers/rust/cargo.nix
111: HOST_PKG_CONFIG_PATH = "${pkgsBuildBuild.pkg-config}/bin/pkg-config";
these days
| 14:05:58 |
emily | that is almost certainly wrong | 14:06:02 |
emily | and this is a silly hack that can go away
pkgs/build-support/rust/build-rust-package/default.nix
141: PKG_CONFIG_ALLOW_CROSS = if stdenv.buildPlatform != stdenv.hostPlatform then 1 else 0;
| 14:06:14 |
emily | other than that the PR LGTM | 14:06:30 |
Alyssa Ross | I guess I'll give it a rebase... | 14:06:55 |
emily | though we have a field for this these days right? | 14:07:22 |
emily | the env form | 14:07:24 |
emily | oh | 14:07:31 |
emily | Alyssa Ross: there is one more wrinkle that maybe John Ericson can help explain | 14:07:41 |
emily | [[ -z ${strictDeps-} ]] || (( "$hostOffset" < 0 )) || return 0
| 14:07:45 |
emily | the hook just does not run if strictDeps. I have no idea why. it seems like this condition is maybe just backwards? | 14:07:59 |
John Ericson | I thought the host offset would be -1 | 14:12:30 |
John Ericson | When used as native build input | 14:12:50 |
John Ericson | This logic should be the same as other wrappers, iirc | 14:13:01 |
John Ericson | Basically the setup hook should only run if you have a pkg config which is runnable at build time | 14:13:28 |
emily | ah | 14:15:42 |
emily | ok, I see | 14:15:43 |
emily | it is to handle the marginal case of buildInputs = [ pkg-config ]; | 14:15:52 |
emily | QuadRadical (Ping / Reply): I think that either it will just build out of the box on top of #196333, or you might need to add depsBuildBuild = [ pkg-config lvm2 ]; and nothing else | 14:16:42 |
emily | (once it's rebased) | 14:16:49 |
QuadRadical (Ping) | okay thanks | 14:27:23 |
QuadRadical (Ping) | its taking ages to build for some reason | 14:27:27 |
QuadRadical (Ping) | perl and gettext is taking so long | 14:27:46 |
Toma | By the way, John Ericson do you remember why the python package-set's spliced scope has splicing disabled for hooks?
The original PR: https://github.com/NixOS/nixpkgs/pull/104201 Currently: https://github.com/NixOS/nixpkgs/blob/b125d87d5b6473acc534c46f06cc0c835c595452/pkgs/development/interpreters/python/passthrufun.nix#L78 Usage of keep: https://github.com/NixOS/nixpkgs/blob/e6d2b439c23fa01b18ae6f677f5e5aba3be48518/lib/customisation.nix#L688-L691 (the comment was added by someone else in https://github.com/NixOS/nixpkgs/commit/dd48cb0b3479912a9c6adfaa7279dbadabaeae2b)
Recent discussion: https://github.com/NixOS/nixpkgs/pull/424913#discussion_r2204760754
| 14:31:52 |
Alyssa Ross | Just checking which one of the many Rust target variables is the right one here, since we've learned a lot about them since 2022 | 14:32:40 |
Alyssa Ross | Yeah it's cargoShortTarget | 14:35:18 |