Without the change the build fails on `gcc-13` as:
$ nix build --impure --expr 'with import ./. {}; mangohud.override { stdenv = gcc13Stdenv; }' -L
mangohud> In file included from ../tests/../src/amdgpu.h:8,
mangohud> from ../tests/test_amdgpu.cpp:9:
mangohud> ../tests/../src/overlay_params.h:229:21: error: 'uint32_t' is not a member of 'std'; did you mean 'wint_t'?
mangohud> 229 | std::vector<std::uint32_t> fps_limit;
mangohud> | ^~~~~~~~
mangohud> | wint_t
This continues where d8f7f6a5ce left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.
Also, similarly to d8f7f6a5ce some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
This removes 'ldgallery' from nixpkgs.
It remains available through the Nix Flake provided by ldgallery.
The package of its "compiler" part was already marked as broken due to
dependencies having gone out of sync with the rest of the Haskell
packages.
The package of its "viewer" part also got out of sync due to changes
in JS dependency manager.
Eliminate uses of `config.cudaSupport or false` and alike, since the
option is now declared in config.nix with a default value
fd .nix -t f -x sed 's/config\.cudaSupport or false, cudaPackages [?] [{][}]/config.cudaSupport, cudaPackages ? { }/' '{}' -i
fd .nix -t f -x sed 's/config\.cudaSupport or false/config.cudaSupport/' '{}' -i
fd .nix -t f -x sed 's/cudaSupport = pkgs.config.cudaSupport/inherit (pkgs.config) cudaSupport/' '{}' -i
fd .nix -t f -x sed 's/cudaSupport = config.cudaSupport/inherit (config) cudaSupport/' '{}' -i
'cudaSupport ? false' -> 'cudaSupport ? config.cudaSupport or false' to respect global defaults
Packages expressions that take `cudaSupport ? false` are likely to
ignore `config.cudaSupport`. Instead, we want them to make `cudaSupport`
a required argument, or to explicitly refer to `config`