From 7a4f6378e96f19aebe0e446a4f48c46b1e38a022 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Thu, 23 Oct 2025 15:57:07 +0300 Subject: [PATCH] nix: build with the mold linker on x86_64-linux Signed-off-by: NotAShelf Change-Id: I5d1e28f9b74fe1a4881a7105722ef3376a6a6964 --- nix/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nix/package.nix b/nix/package.nix index 8ca3d8e..336926a 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -1,6 +1,8 @@ { lib, craneLib, + stdenv, + mold, versionCheckHook, }: let pname = "stash"; @@ -52,6 +54,11 @@ in done ''; + env = lib.optionalAttrs (stdenv.isLinux && !stdenv.hostPlatform.isAarch) { + CARGO_LINKER = "clang"; + CARGO_RUSTFLAGS = "-Clink-arg=-fuse-ld=${mold}/bin/mold"; + }; + meta = { description = "Wayland clipboard manager with fast persistent history and multi-media support"; homepage = "https://github.com/notashelf/stash";