From 2ce2329cff55261525d48991bc81bae5f0d3098b Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 31 Jan 2023 05:17:34 +0000 Subject: [PATCH] mesa: downgrade from 22.3.3 -> 22.3.2 to address a memory leak --- nixpatches/2023-01-30-mesa-cma-leak.patch | 23 +++++++++++++++++++++++ nixpatches/flake.lock | 7 +++---- nixpatches/list.nix | 15 ++++++++------- 3 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 nixpatches/2023-01-30-mesa-cma-leak.patch diff --git a/nixpatches/2023-01-30-mesa-cma-leak.patch b/nixpatches/2023-01-30-mesa-cma-leak.patch new file mode 100644 index 00000000..129c1ea8 --- /dev/null +++ b/nixpatches/2023-01-30-mesa-cma-leak.patch @@ -0,0 +1,23 @@ +diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix +index a79c19eb2eb..088e3418b3f 100644 +--- a/pkgs/development/libraries/mesa/default.nix ++++ b/pkgs/development/libraries/mesa/default.nix +@@ -39,7 +39,7 @@ + let + # Release calendar: https://www.mesa3d.org/release-calendar.html + # Release frequency: https://www.mesa3d.org/releasing.html#schedule +- version = "22.3.3"; ++ version = "22.3.2"; + branch = versions.major version; + + withLibdrm = lib.meta.availableOn stdenv.hostPlatform libdrm; +@@ -62,7 +62,7 @@ self = 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 = "sha256-vteZeIvyvZ7wedl82OCTSL9TywhoGFeOQHc7KxeBKSI="; ++ sha256 = "c15df758a8795f53e57f2a228eb4593c22b16dffd9b38f83901f76cd9533140b"; + }; + + # TODO: + diff --git a/nixpatches/flake.lock b/nixpatches/flake.lock index 1a7a033e..5ba036bc 100644 --- a/nixpatches/flake.lock +++ b/nixpatches/flake.lock @@ -2,16 +2,15 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1673163619, - "narHash": "sha256-B33PFBL64ZgTWgMnhFL3jgheAN/DjHPsZ1Ih3z0VE5I=", + "lastModified": 1675123384, + "narHash": "sha256-RpU+kboEWlIYwbRMGIPBIcztH63CvmqWN1B8GpJogd4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8c54d842d9544361aac5f5b212ba04e4089e8efe", + "rev": "e0fa1ece2f3929726c9b98c539ad14b63ae8e4fd", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-22.11", "type": "indirect" } }, diff --git a/nixpatches/list.nix b/nixpatches/list.nix index c45b300b..479c4db8 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -13,13 +13,6 @@ hash = "sha256-IvsIcd2wPdz4b/7FMrDrcVlIZjFecCQ9uiL0Umprbx0="; }) - # fix libreoffice build by: Revert "mdds: 2.0.3 -> 2.1.0" - # merged 2023/01/25 - (fetchpatch { - url = "https://github.com/NixOS/nixpkgs/pull/212583.diff"; - hash = "sha256-nkXgwQUtxYkJT2OzG6Jc72snizW5wHvR1nmh2KDnaPc="; - }) - # fix handbrake build by: handbrake: 1.5.1 -> 1.6.1 # PR opened 2023/01/23 (fetchpatch { @@ -34,6 +27,14 @@ # allows to actually run signald ./2023-01-25-signald-update.patch + # fix for CMA memory leak in mesa: + # only necessary on aarch64. + # it's a revert of nixpkgs commit dcf630c172df2a9ecaa47c77f868211e61ae8e52 + # NB: next nixpkgs update will require changing a line in this patch: + # - branch = versions.major version; + # + branch = lib.versions.major version; + ./2023-01-30-mesa-cma-leak.patch + # # kaiteki: init at 2022-09-03 # vendorHash changes too frequently (might not be reproducible). # using local package defn until stabilized