Skip to content

Commit

Permalink
Merge pull request #383 from Jovian-Experiments/for-next
Browse files Browse the repository at this point in the history
mesa-radv-jupiter: untangle from main Mesa expression
  • Loading branch information
K900 authored Jul 3, 2024
2 parents 2f9668e + 94ad506 commit 259872c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 27 deletions.
4 changes: 2 additions & 2 deletions modules/steamos/mesa.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
59 changes: 34 additions & 25 deletions pkgs/mesa-radv-jupiter/default.nix
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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"
];
})
}

0 comments on commit 259872c

Please sign in to comment.