From 00e3fe2ad94f7834f95c245851deca9ca23da144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Sat, 16 Dec 2023 21:08:52 +1100 Subject: [PATCH] nushellPlugins: improve clang build The variable is needed on all clang builds. Macos error was incidental since it triggers clang by default. --- pkgs/shells/nushell/plugins/formats.nix | 2 +- pkgs/shells/nushell/plugins/gstat.nix | 2 +- pkgs/shells/nushell/plugins/query.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/shells/nushell/plugins/formats.nix b/pkgs/shells/nushell/plugins/formats.nix index fbc2c0711614f..571077a8d23ba 100644 --- a/pkgs/shells/nushell/plugins/formats.nix +++ b/pkgs/shells/nushell/plugins/formats.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { inherit (nushell) version src; cargoHash = "sha256-eGRaYbYB+zHT8rXm6aCrnPVgyDA8ltsg0GOYgghmov0="; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.cc.isClang { LIBCLANG_PATH = "${libclang.lib}/lib"; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/shells/nushell/plugins/gstat.nix b/pkgs/shells/nushell/plugins/gstat.nix index 6563a9c295ff3..378a1a273ca88 100644 --- a/pkgs/shells/nushell/plugins/gstat.nix +++ b/pkgs/shells/nushell/plugins/gstat.nix @@ -14,7 +14,7 @@ rustPlatform.buildRustPackage rec { inherit (nushell) version src; cargoHash = "sha256-Ar5rFPHf+ugZuugVKVRFACYhh3F0JvQtfp6KibPIByw="; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.cc.isClang { LIBCLANG_PATH = "${libclang.lib}/lib"; }; nativeBuildInputs = [ pkg-config ]; diff --git a/pkgs/shells/nushell/plugins/query.nix b/pkgs/shells/nushell/plugins/query.nix index 274848f8e8fc3..f5f0bbd0acca0 100644 --- a/pkgs/shells/nushell/plugins/query.nix +++ b/pkgs/shells/nushell/plugins/query.nix @@ -13,7 +13,7 @@ rustPlatform.buildRustPackage { inherit (nushell) version src; cargoHash = "sha256-NVdXbpmGBAcv47jbel2cccoe0m2FInSSOnMWofqtpiM="; - env = lib.optionalAttrs stdenv.isDarwin { + env = lib.optionalAttrs stdenv.cc.isClang { LIBCLANG_PATH = "${libclang.lib}/lib"; }; buildInputs = lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];