From a9385a730be60b6caf83c6d10ddebcd12981f977 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 3 Dec 2020 19:47:53 +0100 Subject: [PATCH 1/4] mesa: 20.2.4 -> 20.3.0 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 578763478f5f..65287e954166 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with stdenv.lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "20.2.4"; + version = "20.3.0"; branch = versions.major version; in @@ -46,7 +46,7 @@ stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "14m09bk7akj0k02lg8fhvvzbdsashlbdsgl2cw7wbqfj2mhdqwh5"; + sha256 = "0c6697ls7fkayjblszfdl87cqrkmlfgm29rbsqf56cc7i2777699"; }; prePatch = "patchShebangs ."; From 3106113c9e3af3d4120865e33bc0fbcca7a3c0d2 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 3 Dec 2020 20:00:06 +0100 Subject: [PATCH 2/4] mesa: Drop all old patches There's no need to keep the expressions for old patches around. Also: Apply the musl patch unconditionally to ensure that it doesn't break after future updates. --- pkgs/development/libraries/mesa/default.nix | 34 +++++---------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 65287e954166..0cb123e83ce2 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -58,34 +58,14 @@ stdenv.mkDerivation { ./missing-includes.patch # dev_t needs sys/stat.h, time_t needs time.h, etc.-- fixes build w/musl ./opencl-install-dir.patch ./disk_cache-include-dri-driver-path-in-cache-key.patch - ] - ++ lib.optionals stdenv.hostPlatform.isMusl [ - # Fix `-Werror=int-conversion` pthread warnings on musl. - # TODO: Remove when https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121 is merged and available - (fetchpatch { - name = "nine_debug-Make-tid-more-type-correct"; - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch"; - sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q"; - }) - ] - # do not prefix user provided dri-drivers-path - ++ lib.optional (lib.versionOlder version "19.0.0") (fetchpatch { - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/f6556ec7d126b31da37c08d7cb657250505e01a0.patch"; - sha256 = "0z6phi8hbrbb32kkp1js7ggzviq7faz1ria36wi4jbc4in2392d9"; + # Fix `-Werror=int-conversion` pthread warnings on musl. + # TODO: Remove when https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6121 is merged and available + (fetchpatch { + name = "nine_debug-Make-tid-more-type-correct"; + url = "https://gitlab.freedesktop.org/mesa/mesa/commit/aebbf819df6d1e.patch"; + sha256 = "17248hyzg43d73c86p077m4lv1pkncaycr3l27hwv9k4ija9zl8q"; }) - ++ lib.optionals (lib.versionOlder version "19.1.0") [ - # do not prefix user provided d3d-drivers-path - (fetchpatch { - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/dcc48664197c7e44684ccfb970a4ae083974d145.patch"; - sha256 = "1nhs0xpx3hiy8zfb5gx1zd7j7xha6h0hr7yingm93130a5902lkb"; - }) - - # don't build libGLES*.so with GLVND - (fetchpatch { - url = "https://gitlab.freedesktop.org/mesa/mesa/commit/b01524fff05eef66e8cd24f1c5aacefed4209f03.patch"; - sha256 = "1pszr6acx2xw469zq89n156p3bf3xf84qpbjw5fr1sj642lbyh7c"; - }) - ]; + ]; postPatch = '' substituteInPlace meson.build --replace \ From 886e497f5d44df4198dd6470afe09685ad233985 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 5 Dec 2020 13:18:27 +0100 Subject: [PATCH 3/4] mesa: Switch from LLVM 9 to llvmPackages_latest The radeonsi and radv (without ACO) drivers requires LLVM 11 for GFX 10.3 [0],[1]. E.g. Arch Linux also compiles Mesa with LLVM 11 so this should be fine. [0]: https://docs.mesa3d.org/relnotes/20.2.0.html [1]: https://github.com/NixOS/nixpkgs/pull/105817#issuecomment-738888102 --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cdae67c9821b..95d5994233e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14962,7 +14962,7 @@ in libGLU = mesa_glu; mesa = callPackage ../development/libraries/mesa { - llvmPackages = llvmPackages_9; + llvmPackages = llvmPackages_latest; inherit (darwin.apple_sdk.frameworks) OpenGL; inherit (darwin.apple_sdk.libs) Xplugin; }; From af9f917ce1fa5bbe0800cfaf2dd91cd2674543d3 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 17 Dec 2020 11:58:38 +0100 Subject: [PATCH 4/4] mesa: 20.3.0 -> 20.3.1 --- pkgs/development/libraries/mesa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 0cb123e83ce2..0e18164e6f2f 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -31,7 +31,7 @@ with stdenv.lib; let # Release calendar: https://www.mesa3d.org/release-calendar.html # Release frequency: https://www.mesa3d.org/releasing.html#schedule - version = "20.3.0"; + version = "20.3.1"; branch = versions.major version; in @@ -46,7 +46,7 @@ stdenv.mkDerivation { "ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz" "ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz" ]; - sha256 = "0c6697ls7fkayjblszfdl87cqrkmlfgm29rbsqf56cc7i2777699"; + sha256 = "03vqm9kqrcpijg6bxldj0bg360z8d7c767n3b16jdc1apd4inxdg"; }; prePatch = "patchShebangs .";