Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mesa-radv-jupiter: untangle from main Mesa expression #383

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
];
})
}
Loading