summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-04-17 00:02:32 +0200
committerMel <einebeere@gmail.com>2024-04-17 00:02:32 +0200
commit97c6939a26b3d4dcac843030aa9911aff6b2e5f6 (patch)
treef40251278189f52e243531d0b1d1d34cae750a14 /flake.nix
parentdc21ce532b56b56b1b60ff1bbe5726eff83e4dd5 (diff)
downloadmeowcraft-97c6939a26b3d4dcac843030aa9911aff6b2e5f6.tar.zst
meowcraft-97c6939a26b3d4dcac843030aa9911aff6b2e5f6.zip
Nix build Linux with Wayland
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/flake.nix b/flake.nix
index 2124904..b13d1e9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -27,10 +27,12 @@
       # NOTE: GLFW depends on OpenSSL and coreutils, which are very
       # large dependencies and have to be rebuilt from source to be able
       # to be linked statically. Maybe there is a way to avoid this?
-      glfw-static =  pkgs.glfw.overrideAttrs {
+      glfw-static =  (pkgs.glfw.overrideAttrs (oldAttrs: {
         pname = "glfw-static";
-        cmakeFlags = [ "-DBUILD_SHARED_LIBS=OFF" ];
-      };
+        cmakeFlags = oldAttrs.cmakeFlags ++ [
+          "-DBUILD_SHARED_LIBS=OFF"
+        ];
+      })).override { waylandSupport = pkgs.stdenv.isLinux; };
 
       glew-static =  pkgs.glew.overrideAttrs {
         pname = "glew-static";
@@ -52,8 +54,8 @@
           glfw-static glew-static
         ]) ++ lib.optionals stdenv.isDarwin (with darwinFrameworks; [
           Cocoa OpenGL
-        ]) ++ lib.optionals stdenv.isLinux (with pkgs.xorg; [
-          libX11 libXau libXdmcp
+        ]) ++ lib.optionals stdenv.isLinux (with pkgs; [
+          wayland wayland-protocols libffi
         ]);
       };
     });