From 68163d27e90a3f67cf131abacde310801705b66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Fri, 17 Mar 2023 14:11:37 +0100 Subject: [PATCH] [backport 22.11] starship: condition nushell integration on nushell 0.73+ (#3777) Older versions are not supported: https://starship.rs/#nushell (cherry picked from commit a3b90e57621b90b821827393b3365b7cd700f025) --- modules/programs/starship.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index 31136d7e..dd4750ec 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -80,6 +80,14 @@ in { }; config = mkIf cfg.enable { + assertions = [{ + assertion = cfg.enableNushellIntegration + -> versionAtLeast config.programs.nushell.package.version "0.73"; + message = '' + Nushell integration for starship requires nushell 0.73 or later. + ''; + }]; + home.packages = [ cfg.package ]; xdg.configFile."starship.toml" = mkIf (cfg.settings != { }) {