Commit Graph

632 Commits

Author SHA1 Message Date
K900
3279ccd851 mesa-libclc: init at 22.1.8.3, use in mesa 2026-08-06 17:26:46 +03:00
K900
cac87cf2d5 mesa: migrate to finalAttrs 2026-06-17 19:22:56 +03:00
Sigmanificient
0bbc8dffae treewide: set meta.license on hooks 2026-05-25 13:48:20 +02:00
K900
5e554dedcd mesa: drop jdupes dependency
Doesn't actually do anything, upstream installs symlinks correctly
and has done so for a very long time.
2026-05-10 05:54:49 +03:00
Alba Mendez
51e4265a5a mesa: allow rusticl zink to find libvulkan 2026-02-09 12:41:02 +01:00
quantenzitrone
584757f348 xcbutilkeysyms: rename references and deprecate alias
this shouldn't create any rebuilds
2026-02-04 22:58:56 +01:00
quantenzitrone
7d8132a92c treewide: remove references to the xorg namespace in pkgs (automated)
this creates some eval errors that will be fixed in the next commit

done with the following script:

```fish
\#!/usr/bin/env fish

set packagesjson (nix eval --impure --json --expr '
let
  lib = import ./lib;
in
import pkgs/servers/x11/xorg/default.nix (lib.mapAttrs (
  name: _:
  if name == "lib" then
    lib
  else if name == "config" then
    { allowAliases = false; }
  else
    name
) (__functionArgs (import pkgs/servers/x11/xorg/default.nix))) { }
' | jq)

set one (grep '^    [A-Za-z0-9_-]*$' pkgs/servers/x11/xorg/default.nix | string trim | string replace -r '$' Z | sort | string sub -e -1)
set two (grep '^  [A-Za-z0-9_-]* = [A-Za-z0-9_-]*;$' pkgs/servers/x11/xorg/default.nix | cut -d= -f1 | string trim | string replace -r '$' Z | sort | string sub -e -1)

for arg in $one $two
    set oname $arg
    set nname (echo $packagesjson | jq -r .$oname)

    if test $nname = null
        echo (set_color red)warn:(set_color normal) unknown package xorg.$oname >&2
        continue
    end

    echo $oname "->" $nname

    # replace basic xorg.$name references
    for file in (rg -F "xorg.$oname" --files-with-matches pkgs)
        # special cases
        sd -F "$oname = xorg.$oname;" "$nname = $nname;" $file

        # replace
        sd -F "xorg.$oname" "$nname" $file

        # fixup function arguments

        # prevent duplicate function args
        if grep -E " ($oname|$nname),\$" $file >/dev/null
            continue
        end

        if grep 'xorg\..' $file >/dev/null # case1: there is more so we can't just remove the function arg

            if grep ' xorg,$' $file >/dev/null
                sd ' xorg,$' " xorg,
                $nname," $file

            else if grep ' xorg ? .*,$' $file >/dev/null
                sd 'xorg( ? .*),$' "xorg\$1,
                $nname," $file

            else
                sd -F 'xorg,' "$nname,
                xorg," $file
            end

        else # case there is no more xorg..* so we can just replace the function arg
            sd 'xorg(| ? .*),.*$' "$nname," $file
        end
    end
end

nix fmt
```
2026-01-25 22:28:09 +01:00
quantenzitrone
c7c77c1aee treewide: remove all uses of 'with xorg;' in pkgs
this shouldn't create any rebuilds

this was done manually by grepping for `with xorg` and `with pkgs.xorg`
2026-01-25 22:26:00 +01:00
K900
66d1e19eeb mesa: 25.3.3 -> 25.3.4
musl fixes got merged upstream
2026-01-24 10:58:53 +03:00
K900
ed9dbbd2c3 mesa: 25.3.2 -> 25.3.3
32-bit build errors fixed.
2026-01-01 22:58:56 +03:00
Linus Karl
f5d0dbe994 mesa: drop unneeded vdpau dependency 2025-12-04 20:25:24 +01:00
Val Packett
d9f16a2f59 mesa: enable amdgpu-virtio (native context) support
Fixes #441300
2025-11-28 03:26:34 -03:00
Alyssa Ross
cbe068324d mesa: fix build for musl
Fixes: ae921d60d3 ("mesa: 25.2.6 -> 25.3.0")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
2025-11-20 23:22:53 +01:00
Colin
4264f487ee mesa: move pco_clc to cross_tools output
pco_clc is another one of those build helpers, newly added to mesa.
installing it to `cross_tools` fixes cross compilation of mesa.
2025-11-17 00:45:08 +00:00
K900
1aa23f2e1b mesa: gate NPU drivers on 64-bit targets only
ethosu fails to build entirely, rocket does a bunch of pointer-to-int64
and back casts that will be wildly unsafe on 32-bit.
2025-11-15 13:40:52 +03:00
K900
ae921d60d3 mesa: 25.2.6 -> 25.3.0 2025-11-15 13:01:48 +03:00
NAHO
c8d4dabc43 pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2025-10-04 19:02:37 +02:00
Weijia Wang
e7778d1d0f mesa: fix build with llvm 21 on exotic platforms 2025-10-02 11:27:15 +02:00
ghpzin
6aae2245d2 mesa: fix build with gcc15
- remove `rustPlatform.bindgenHook` from `buildInputs`,
`rustPlatform.bindgenHook` adds gcc headers to `BINDGEN_EXTRA_CLANG_ARGS`
which somehow conflict more with gcc15 than gcc14.
Removing hook should let meson use bindgen from cli with clang libraries.

Fixes bindgen error building `mesa` with gcc15:
```
FAILED: [code=1] src/nouveau/compiler/nak_bindings.rs
/nix/store/rm899xgm82kanr814dk8siwyghyxwphg-rust-bindgen-0.72.0/bin/bindgen
../src/nouveau/compiler/nak_bindings.h ...
/build/source/src/nouveau/winsys/./nouveau_bo.h:41:4: error: unknown
type name 'atomic_uint_fast32_t'
Unable to generate bindings: clang diagnosed error:
/build/source/src/nouveau/winsys/./nouveau_bo.h:41:4: error: unknown
type name 'atomic_uint_fast32_t'
```
2025-09-25 12:15:05 +03:00
K900
866d35cdd3 mesa: fix conditional correctly this time
Ugh. I'm sorry.
2025-08-06 22:09:45 +03:00
K900
14e912f44d mesa: re-disable Intel RT on 32-bit targets
This seems to have been unintentional upstream - only x86_64
and aarch64 are supported.

9436a96c10
2025-08-06 21:56:17 +03:00
K900
ed269e9fcd mesa: enable all drivers on all platforms 2025-08-06 20:26:50 +03:00
K900
5948e30f93 mesa: enable intel-rt unconditionally (via mesonAutoFeatures)
It builds on non-x86 now.
2025-08-06 20:26:50 +03:00
K900
7ce0aff371 mesa: 25.1.7 -> 25.2.0
Now featuring:
- too many Rust dependencies
- the final death of gallium-xa
- last minute Darwin build fixes
2025-08-06 20:26:50 +03:00
Vladimír Čunát
0170f90d6c mesa.disallowedRequisites: avoid null values
See e.g. 40df6d5
2025-07-25 15:19:41 +02:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Guillaume Girol
f37801034a mesa: __structuredAttrs = true
needed by separateDebugInfo = true
2025-06-14 22:14:56 +02:00
K900
c80aab436c mesa: 25.0.6 -> 25.1.1
- osmesa is no more
- build asahi
- build more layers
- extra cross crimes
2025-05-21 13:47:10 +03:00
Yureka
0ed30b0f6e mesa: expose built platforms as passthru
This is useful when overriding mesa to remove or add specific platforms to the existing set
2025-04-25 16:51:08 +02:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Thibault Gagnaux
a9df43c429 mesa: reenable XA for now 2025-03-31 10:16:58 +03:00
K900
f9691c4d68 mesa: drop clover
It's officially deprecated now, and Rusticl is both faster and more compatible.
2025-03-21 09:41:05 +03:00
K900
9c024b01ae mesa: 25.0.1 -> 25.0.2
Diff: https://gitlab.freedesktop.org/mesa/mesa/-/compare/mesa-25.0.1...mesa-25.0.2

Changelog: https://docs.mesa3d.org/relnotes/25.0.2.html
2025-03-20 19:30:36 +03:00
Charlotte 🦝 Deleńkec
e40d29d428 mesa: Backport graphical corruption fix
This fixes a graphical corruption bug in Final Fantasy XIV where tiny
colored rectangles appear over some geometry.
2025-03-13 15:30:09 +01:00
K900
5da892d21c mesa: output cleanup, part 2
- build with out-of-tree libgbm
- $drivers -> $out, since $out is basically empty now
2025-03-11 22:16:23 +03:00
Colin
6bf3337ff5 mesa: fix cross compilation
starting with 25.0.0, mesa no longer builds CLC executables when cross compiling:
it finds the `mesa-clc` & others we explicitly provide it, decides
there's no reason to build new versions of those components, and
so cross-compiled mesa no longer produces any `cross_tools` output.

excerpted from upstream src/compiler/clc/meson.build:

```meson
if get_option('mesa-clc') != 'system' and (with_gallium_asahi or \
                                           with_asahi_vk or \
                                           with_intel_vk or \
                                           with_gallium_iris or \
                                           get_option('install-mesa-clc'))
  prog_mesa_clc = executable(
    'mesa_clc',
    ['mesa_clc.c'],
    include_directories : [inc_include, inc_src],
    c_args : [pre_args, no_override_init_args],
    link_args : [ld_args_build_id],
    dependencies : [idep_mesaclc, dep_llvm, dep_spirv_tools, idep_getopt],
    # If we can run host binaries directly, just build mesa_clc for the host.
    # Most commonly this happens when doing a cross compile from an x86_64 build
    # machine to an x86 host
    native : not meson.can_run_host_binaries(),
    install : get_option('install-mesa-clc'),
  )
endif
```
2025-03-09 00:07:55 +00:00
K900
afe2ba39e4 mesa: output cleanup, part 1
- add sanity check for mesa-gl-headers
- drop osmesa, gallium-nine, xatracker from default build
- move teflon to $drivers
- rename $driversdev to $cross_tools to reflect its real use
2025-03-06 09:09:52 +03:00
K900
4e009205b7 mesa: 24.3.4 -> 25.0.1
Avoid moving pipe_* to $opencl, because pipe-loader is linked everywhere now
2025-03-06 09:09:08 +03:00
Vladimír Čunát
6a0ba68039 Revert "Fix Xf86videointel driver immediate crash on NixOS (Mesa Patch Backport)" 2025-02-27 08:06:41 +01:00
tjk918
4958f38b38 Add fetchpatch dependency 2025-02-06 18:34:08 -06:00
Tim Keller
dd1d577ac3 mesa: backport dril patch that fixes xf86videointel 2025-02-02 11:03:16 -06:00
Colin
302f5b5488 mesa: fix cross compilation
this follows the same pattern as used for mesa's `intel-clc` build helper:

1. build `mesa-clc` for the build machine.
2. provide the native `mesa-clc` when cross-compiling mesa.

the meson changes for this have been upstreamed into the next release:

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32719
2024-12-30 06:43:37 +00:00
K900
1337b7d777 mesa: fix broken vaapi/vdpau symlinks 2024-12-26 10:00:36 +03:00
K900
09cbcd6475 mesa: 24.2.8 -> 24.3.1 2024-12-05 12:37:25 +03:00
György Kurucz
5931ac4ea9 mesa: enable all freedreno kernel mode driver
`virtio` is used with a virtio-gpu device supporting drm native context.
I don't know the use-cases for `wsl` and `kgsl`, but let's just enable
them too.
2024-12-02 09:34:23 +01:00
Reno Dakota
52bf1163fa treewide: use getLib when accessing clang / libclang / stdenv.cc.cc
In preparation to eliminate the lib output for the unwrapped clang, use
`lib.getLib` to access the `lib` output.
2024-11-07 10:27:41 +00:00
Artturin
cc705b79cb mesa: Don't error: attribute 'driversdev' missing
`legacyPackages.aarch64-darwin.pkgsCross.aarch64-multiplatform.mesa.nativeBuildInputs`

Missing attribute errors can't be caught
2024-09-27 23:17:49 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
K900
6efb622aca mesa: 24.2.1 -> 24.2.2 2024-09-06 08:24:55 +03:00
K900
02a4d9a728 mesa: cherry-pick fixes for software rendering fallback 2024-09-05 11:41:01 +03:00