!UNVBThoJtlIiVwiDjU:nixos.org

Staging

315 Members
Staging merges | Running staging cycles: https://github.com/NixOS/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Astaging-next+head%3Astaging-next-25.05 | Review Reports: https://malob.github.io/nix-review-tools-reports/108 Servers

Load older messages


SenderMessageTime
20 Sep 2025
@ghpzin:envs.netghpzinI do not think so, but it was pretty hard to get any info out of that thing.18:47:40
@emilazy:matrix.orgemily where does bindgenHook do that propagation? 18:48:09
@emilazy:matrix.orgemily
  bindgenHook = makeSetupHook {
    name = "rust-bindgen-hook";
    substitutions = {
      libclang = (lib.getLib clang.cc);
      inherit clang;
    };
  } ./rust-bindgen-hook.sh;
18:48:18
@ghpzin:envs.netghpzinhttps://github.com/symphorien/nixpkgs/blob/777a91f6f893c09cbbcf1144e48be2acd2a620e9/pkgs/build-support/rust/hooks/rust-bindgen-hook.sh#L918:48:29
@ghpzin:envs.netghpzin* https://github.com/nixos/nixpkgs/blob/master/pkgs/build-support/rust/hooks/rust-bindgen-hook.sh#L918:48:46
@emilazy:matrix.orgemily that's because bindgen uses libclang, right…? 18:48:49
@emilazy:matrix.orgemilyso it needs to know how to compile C code with Clang flags18:49:10
@lt1379:matrix.orgLuninclude_next and wrappers adding hundreds of weirdly ordered isystem include dirs, name a better duo18:49:28
@dramforever:matrix.orgdramforever looks like it's sending $NIX_CFLAGS_COMPILE into bindgen wrapper 18:49:48
@ghpzin:envs.netghpzin clang has all gcc/glibc things in /nix-support/cc-cflags and /nix-support/libcxx-cxxflags, probably because it itself is build with gcc 18:50:17
@emilazy:matrix.orgemilybut… that's correct right?18:50:36
@emilazy:matrix.orgemily those are the flags you'd use if you were compiling with clang 18:50:37
@emilazy:matrix.orgemily if you mean libgcc, that's correct 18:50:47
@emilazy:matrix.orgemilyor well18:50:51
@emilazy:matrix.orgemilydepending…18:50:54
@emilazy:matrix.orgemily but I mean if clang has the wrong flags for compiling with Clang in it then Clang would be broken 18:51:12
@ghpzin:envs.netghpzin But do you expect to bindgen to always use those things by default ? 18:51:17
@emilazy:matrix.orgemily like it should mirror the flags you'd get with llvmPackages.stdenv18:51:20
@ghpzin:envs.netghpzin But do you expect for bindgen to always use those things by default ? 18:51:31
@emilazy:matrix.orgemily yes. what bindgen does is use libclang to read C code and generate Rust bindings based on that 18:51:35
@emilazy:matrix.orgemilybindgen is, essentially, Clang18:51:43
@emilazy:matrix.orgemilywe have the hook so that it can find glibc, the dependencies of the derivation, etc.18:51:52
@lt1379:matrix.orgLunduplicating something that would be correct alone is enough to mess up include_next iirc?18:52:13
@emilazy:matrix.orgemily we use the flags from @clang@ because it is a kind of Clang, so it needs the Clang logic from cc-wrapper rather than the GCC logic 18:52:14
@emilazy:matrix.orgemily for atomics though I'm not quite sure, because I think that might be a libgcc vs. compiler-rt distinction 🥴 18:52:40
@qyliss:fairydust.spaceAlyssa RossWhy does mesa even have bindgenHook18:53:11
@qyliss:fairydust.spaceAlyssa Rosssurely it doesn't use the bindgen crate, being a meson project18:53:19
@qyliss:fairydust.spaceAlyssa Rossyep, doesn't look like it…18:53:47
@emilazy:matrix.orgemilyas in it's just using the bindgen CLI?18:54:12
@emilazy:matrix.orgemilyand our hook breaks the CLI?18:54:16

Show newer messages


Back to Room ListRoom Version: 6