From e46763d86deb5affa78956cb924d0e650d1ad3f8 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Tue, 11 Feb 2025 13:14:20 -0800 Subject: [PATCH] fix: use zoxide 0.9.7 if nushell newer than 0.102.0 --- hm/modules/common/shellenv/default.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hm/modules/common/shellenv/default.nix b/hm/modules/common/shellenv/default.nix index 25376b8..7bc6dc6 100644 --- a/hm/modules/common/shellenv/default.nix +++ b/hm/modules/common/shellenv/default.nix @@ -90,6 +90,21 @@ in enableFishIntegration = false; enableNushellIntegration = true; enableBashIntegration = true; + package = + if + (lib.versionAtLeast pkgs.zoxide.version "0.9.7" || lib.versionOlder pkgs.nushell.version "0.102.0") + then + pkgs.zoxide + else + pkgs.zoxide.overrideAttrs (finalAttrs: { + version = "0.9.7"; + src = pkgs.fetchFromGitHub { + owner = "ajeetdsouza"; + repo = "zoxide"; + rev = "v${finalAttrs.version}"; + hash = "sha256-3XC5K4OlituoFMPN9yJkYi+tkH6M0KK5jVAGdr/GLd0="; + }; + }); }; programs.gh = {