From 725d770fa0fb0b4be727c84a648ecc0d21c44413 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 13 May 2026 11:31:56 +0200 Subject: [PATCH] fix(flake): guard linux-only deps behind stdenv.isLinux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wayland, alsa-lib, and udev are Linux-only — including them unconditionally breaks evaluation on darwin. --- flake.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index f33975a..ff61f0e 100644 --- a/flake.nix +++ b/flake.nix @@ -20,16 +20,18 @@ let overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; - runtimeLibs = with pkgs; [ - libx11 - libxcursor - libxi - libxkbcommon - libxcb - wayland - vulkan-loader - glfw - ]; + runtimeLibs = + with pkgs; + [ + libx11 + libxcursor + libxi + libxkbcommon + libxcb + vulkan-loader + glfw + ] + ++ lib.optional pkgs.stdenv.isLinux wayland; takeScreenshots = pkgs.writeShellApplication { name = "take-screenshots"; @@ -135,6 +137,8 @@ ]; }) pkg-config + ] + ++ lib.optionals pkgs.stdenv.isLinux [ alsa-lib.dev udev.dev ]