| I'm having trouble overriding stdenv for the nix package:
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
outputs =
inputs:
let
pkgs = import inputs.nixpkgs {
system = "x86_64-linux";
};
in
{
packages.x86_64-linux = {
nix_2_30_clang = pkgs.nixVersions.nix_2_30.override {
stdenv = pkgs.clangStdenv;
};
};
};
}
Building this package does not actually trigger a build but reuses the gcc artifacts while rebuilding some kind of wrapper (?)
$ nix build .#packages.x86_64-linux.nix_2_30_clang
$ readelf -p .comment ./result/bin/nix
String dump of section '.comment':
[ 1] GCC: (GNU) 14.3.0
This should probably say something like:
[ 0] GCC: (GNU) 14.3.0
[ 12] clang version 18.1.8
Overriding still works for the autoconf based build (nix_2_24) but not for any of the newer package builds. It seems like the override is silently ignored and not passed down to the sub-derivations anymore.
|