From e2c62cf970b2e0ed16a694ce9e0f9f9c17f048e8 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Thu, 3 Apr 2025 20:59:16 +0300 Subject: [PATCH] feat: libiconv on darwin --- modules/common/rust.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/common/rust.nix b/modules/common/rust.nix index 49c20fa..ef096d6 100644 --- a/modules/common/rust.nix +++ b/modules/common/rust.nix @@ -1,7 +1,15 @@ -{ lib, pkgs, ... }: let - inherit (lib) attrValues; +{ config, lib, pkgs, ... }: let + inherit (lib) attrValues makeLibraryPath mkIf; in { - environment.variables.CARGO_NET_GIT_FETCH_WITH_CLI = "true"; + environment.variables = { + CARGO_NET_GIT_FETCH_WITH_CLI = "true"; + + LIBRARY_PATH = mkIf config.isDarwin <| makeLibraryPath <| attrValues { + inherit (pkgs) + libiconv + ; + }; + }; environment.systemPackages = attrValues { inherit (pkgs)