From adb34ed5e352a50c6ead8d62227bef1947e684d6 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Fri, 22 Aug 2025 10:49:22 +0300 Subject: [PATCH] nix: make mold optional --- nix/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index f8f4800..c86bb1f 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -22,12 +22,15 @@ version ? "git", doCheck ? false, debug ? false, + # whether to use the mold linker + # disable this for older machines without SSE4_2 and AVX2 support + withMold ? true, }: let inherit (builtins) foldl'; inherit (lib.lists) flatten; adapters = flatten [ - stdenvAdapters.useMoldLinker + (lib.optional withMold stdenvAdapters.useMoldLinker) (lib.optional debug stdenvAdapters.keepDebugInfo) ]; @@ -52,7 +55,7 @@ in buildInputs = [ hwdata - hyprutils + (hyprutils.override {inherit withMold;}) libdisplay-info libdrm libffi