| 10 Nov 2024 |
Alyssa Ross | If we just overrode the flags for stdenv.cc, that would mean packages already pinned to gcc13 don't have to worry about the flags, which might be nice?
| 19:25:15 |
Alyssa Ross | Doesn't matter too much either way though I think | 19:25:22 |
emily | no | 19:25:55 |
emily | gcc = stdenv.cc ≠ gcc13 | 19:26:00 |
Alyssa Ross | Oh that's actually good then? | 19:26:07 |
Alyssa Ross | We can leave gcc13 alone | 19:26:18 |
emily | in that the override should just be in stdenv and nowhere else? | 19:26:21 |
Alyssa Ross | Yeah | 19:26:24 |
emily | I guess so, but when I see gcc = pkgs.${"gcc${toString default-gcc-version}"} I'm not expecting the two to behave differently… | 19:26:54 |
Alyssa Ross | Redacted or Malformed Event | 19:29:19 |
@trofi:matrix.org | I agree stdenv overlay is scary in that way and requires some time to get used to it. | 21:28:29 |
p14 | It would be good to have a comment next to the gcc at least to point out that it is overlaid. Otherwise we get the confusing situation emily was in where it was necessary to first identify "this is not the gcc you are looking for" before you can even figure out any other issues. | 21:43:29 |
emily | my mental model was always that only stdenv.* has weird overlay stuff once the bootstrap is complete | 21:46:41 |
emily | but I guess that was all wrong | 21:46:45 |
| 11 Nov 2024 |
| Carlo Cabrera joined the room. | 05:03:14 |
@trofi:matrix.org | p14: gcc is not very special. Same goes for, say, glibc (or xz). glibc is even fancier, as it's built is even earlier than gcc:
nix-repl> [ stdenv lv.stdenv gcc.stdenv xz.stdenv glibc.stdenv perl.stdenv ]
[
«derivation /nix/store/wzis3nzvh90z9jvdn0v3ixrl5qckla36-stdenv-linux.drv»
«derivation /nix/store/wzis3nzvh90z9jvdn0v3ixrl5qckla36-stdenv-linux.drv»
«derivation /nix/store/1glwz1vx32xnwc0xyg25qp8ykp4qgihn-bootstrap-stage4-stdenv-linux.drv»
«derivation /nix/store/afsnvmh8hly6gqiam1rmnxqhm1zqxas2-bootstrap-stage4-stdenv-linux.drv»
«derivation /nix/store/ivbchmrk6vr7dfg55w35h28535kmsbjz-bootstrap-stage2-stdenv-linux.drv»
«repeated»
]
| 07:04:17 |
Randy Eckenrode | In reply to @emilazy:matrix.org gcc = stdenv.cc ≠ gcc13 This was fixed for Darwin. Can it be fixed for Linux? | 14:51:42 |
Randy Eckenrode | On Darwin:
nix-repl> [ clang clang_16 llvmPackages.clang llvmPackages_16.clang stdenv.cc ]
[
«derivation /nix/store/62sadwh9mwfgxmk6kx62yia20rd1j5w4-clang-wrapper-16.0.6.drv»
«derivation /nix/store/62sadwh9mwfgxmk6kx62yia20rd1j5w4-clang-wrapper-16.0.6.drv»
«derivation /nix/store/62sadwh9mwfgxmk6kx62yia20rd1j5w4-clang-wrapper-16.0.6.drv»
«derivation /nix/store/62sadwh9mwfgxmk6kx62yia20rd1j5w4-clang-wrapper-16.0.6.drv»
«derivation /nix/store/62sadwh9mwfgxmk6kx62yia20rd1j5w4-clang-wrapper-16.0.6.drv»
]
| 14:52:25 |
emily | I don't know anything about how the overlaying works, so maybe? :) | 14:52:48 |
emily | it'd make things more convenient for me at least | 14:52:52 |
Randy Eckenrode | https://github.com/NixOS/nixpkgs/blob/db2a0eaf13018f970376297fc53b4c41df5f193f/pkgs/stdenv/darwin/default.nix#L1268-L1277 | 14:53:41 |
Randy Eckenrode | I assume Linux could work the same way. Get the unversioned GCC’s version from the prior stage then set "gcc_${version}" = self.gcc; in the overlay.
| 14:54:29 |
Randy Eckenrode | LLVM is worse because of all the packages it has, but GCC should be pretty easy like that. | 14:55:01 |
Randy Eckenrode | (I did this because I got really tired of rebuilding the default version of LLVM just because something used llvmPackages_X.)
| 14:55:47 |
@trofi:matrix.org | Sure, overriding more would work just fine. | 16:47:30 |
sterni | Randy Eckenrode: do you think it is possible to get rid of this https://github.com/NixOS/nixpkgs/blob/03676a7e0ff1a54a9dabd749559ed6beca5abd5c/pkgs/stdenv/generic/default.nix#L117-L119? This is kind of annoying since it means that all of buildPackages gets rebuilt when changing targetPlatform even if derivations are target agnostic | 22:04:08 |
emily | I think we would have to move it into the compiler wrappers | 22:05:03 |
emily | which seems feasible? | 22:05:36 |
emily | there's a weird thing where the GCC build reads it and I don't entirely understand why | 22:05:45 |
emily | otherwise it's just an ld-wrapper thing that presumably could be set in the ld-wrapper Nix derivation | 22:06:01 |