diff --git a/modules/steamos/mesa.nix b/modules/steamos/mesa.nix index 7846739a..f8ad55ff 100644 --- a/modules/steamos/mesa.nix +++ b/modules/steamos/mesa.nix @@ -52,8 +52,8 @@ in # Jupiter RADV (lib.mkIf (cfg.enableVendorRadv) { hardware.graphics = { - extraPackages = [ (lib.hiPrio pkgs.mesa-radv-jupiter.drivers) ]; - extraPackages32 = [ (lib.hiPrio pkgs.pkgsi686Linux.mesa-radv-jupiter.drivers) ]; + extraPackages = [ (lib.hiPrio pkgs.mesa-radv-jupiter) ]; + extraPackages32 = [ (lib.hiPrio pkgs.pkgsi686Linux.mesa-radv-jupiter) ]; }; environment.etc."drirc".source = pkgs.mesa-radv-jupiter + "/share/drirc.d/00-radv-defaults.conf"; diff --git a/pkgs/mesa-radv-jupiter/default.nix b/pkgs/mesa-radv-jupiter/default.nix index 369cd3e0..65199d1f 100644 --- a/pkgs/mesa-radv-jupiter/default.nix +++ b/pkgs/mesa-radv-jupiter/default.nix @@ -1,15 +1,9 @@ -{ mesa, fetchFromGitHub }: +{ stdenv, mesa, fetchFromGitHub }: let version = "24.1.0"; jupiterVersion = "steamos-24.4.0"; -in (mesa.override { - galliumDrivers = []; - vulkanDrivers = ["amd"]; - vulkanLayers = []; - enableGalliumNine = false; - enableOSMesa = false; - enableOpenCL = false; -}).overrideAttrs(old: { +in stdenv.mkDerivation { + pname = "mesa"; version = "${version}.${jupiterVersion}"; src = fetchFromGitHub { @@ -19,23 +13,38 @@ in (mesa.override { hash = "sha256-fWtEH8Ln1QZKMa7Y8sLexWyQYhNIuMhIUQPy198Oopg="; }; - # Filter out nixpkgs disk cache key, we trust vendor here - mesonFlags = old.mesonFlags ++ [ - # Disable all the Gallium stuff that we don't need because no drivers - "-Degl=disabled" - "-Dglvnd=disabled" - "-Dgallium-vdpau=disabled" - "-Dgallium-va=disabled" - "-Dgallium-xa=disabled" + inherit (mesa) buildInputs nativeBuildInputs propagatedBuildInputs; - # Disable libgbm to save space - "-Dgbm=disabled" + separateDebugInfo = true; - # Disable intel-clc to avoid libclc dependency - "-Dintel-clc=system" - "-Dintel-rt=disabled" + mesonAutoFeatures = "auto"; - # Vendor sets this - "-Dradv-build-id=64474a6475eb8af2b44ef334793fd58ad89875f6" + # See https://github.com/Jovian-Experiments/PKGBUILDs-mirror/blob/jupiter-main/mesa-radv/PKGBUILD + mesonFlags = [ + "-D b_ndebug=true" + "-D b_lto=false" + "-D platforms=x11,wayland" + "-D gallium-drivers=" + "-D gallium-vdpau=disabled" + "-D gallium-va=disabled" + "-D gallium-xa=disabled" + "-D android-libbacktrace=disabled" + "-D vulkan-drivers=amd" + "-D vulkan-layers=" + "-D dri3=enabled" + "-D egl=disabled" + "-D gbm=disabled" + "-D gles1=disabled" + "-D gles2=disabled" + "-D glvnd=disabled" + "-D glx=disabled" + "-D libunwind=enabled" + "-D llvm=enabled" + "-D lmsensors=disabled" + "-D osmesa=false" + "-D microsoft-clc=disabled" + "-D valgrind=enabled" + "-D intel-rt=disabled" + "-D radv-build-id=64474a6475eb8af2b44ef334793fd58ad89875f6" ]; -}) +} \ No newline at end of file