about summary refs log tree commit diff
path: root/nixos/modules/apple-silicon-support/packages/mesa-asahi-edge
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2023-02-14 23:36:38 +0900
committersefidel <contact@sefidel.net>2023-02-14 23:38:29 +0900
commit748adbac7ca3452d0a1250c37ff4168d6ccf5ae0 (patch)
tree7be36fd9da46399b3a98bc1b3e9309bd3ce64fb3 /nixos/modules/apple-silicon-support/packages/mesa-asahi-edge
parentadf6baa00e038e49cf477160eeddc886efced2b4 (diff)
downloadnixrc-748adbac7ca3452d0a1250c37ff4168d6ccf5ae0.tar.gz
nixrc-748adbac7ca3452d0a1250c37ff4168d6ccf5ae0.zip
feat(nixos): init kompakt
Diffstat (limited to 'nixos/modules/apple-silicon-support/packages/mesa-asahi-edge')
-rw-r--r--nixos/modules/apple-silicon-support/packages/mesa-asahi-edge/default.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/nixos/modules/apple-silicon-support/packages/mesa-asahi-edge/default.nix b/nixos/modules/apple-silicon-support/packages/mesa-asahi-edge/default.nix
new file mode 100644
index 0000000..6a18ecc
--- /dev/null
+++ b/nixos/modules/apple-silicon-support/packages/mesa-asahi-edge/default.nix
@@ -0,0 +1,22 @@
+{ lib
+, fetchFromGitLab
+, mesa }:
+
+(mesa.override {
+  galliumDrivers = [ "swrast" "asahi" ];
+  vulkanDrivers = [ "swrast" ];
+  enableGalliumNine = false;
+}).overrideAttrs (oldAttrs: {
+  version = "23.0.0";
+  # https://github.com/AsahiLinux/PKGBUILDs/blob/stable/mesa-asahi-edge/PKGBUILD
+  src = fetchFromGitLab {
+    domain = "gitlab.freedesktop.org";
+    owner = "asahi";
+    repo = "mesa";
+    rev = "01a8a3f3d6089d980e7ae56f6e631c8213f0e49d";
+    hash = "sha256-i4W9pyoELTKFlhTMPIEHTmBGR21+kVDukm351XtPjL8=";
+  };
+  # remove flag to configure xvmc functionality as having it
+  # breaks the build because that no longer exists in Mesa 23
+  mesonFlags = lib.filter (x: !(lib.hasPrefix "-Dxvmc-libs-path=" x)) oldAttrs.mesonFlags;
+})