From 5b3398668b2b7f41607cf77fc9f1cb6402716882 Mon Sep 17 00:00:00 2001 From: Pierre Baillet Date: Sat, 16 Dec 2023 10:19:57 +0100 Subject: [PATCH] fish: Fix babelization of hm-session-vars Wrap babelfish version of hm-session-vars.sh into a function to avoid a syntax error due to the use of `return` in the script. --- modules/programs/fish.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 20660f54..ac3663ef 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -221,9 +221,11 @@ let translatedSessionVariables = pkgs.runCommandLocal "hm-session-vars.fish" { } '' + (echo "function setup_hm_session_vars;" ${pkgs.buildPackages.babelfish}/bin/babelfish \ - <${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh \ - >$out + <${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh + echo "end" + echo "setup_hm_session_vars") > $out ''; in {