From 40c21b15cdee8302afb5d89a140daf0114fdf147 Mon Sep 17 00:00:00 2001 From: Gaute Ravndal Date: Sat, 10 Jan 2026 09:12:57 +0100 Subject: [PATCH] nixos/programs/fish: set absolute path in babelfishTranslate Babelfish translates `source script.sh` to `argv0 < script.sh | source`, which is impure, and breaks when babelfish isn't in `systemPackages`. To fix this, exec babelfish with argv0 set to babelfish from the final system. --- nixos/modules/programs/fish.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/programs/fish.nix b/nixos/modules/programs/fish.nix index 98915f530e82..4c622bd7dcfc 100644 --- a/nixos/modules/programs/fish.nix +++ b/nixos/modules/programs/fish.nix @@ -48,7 +48,7 @@ let path: name: pkgs.runCommandLocal "${name}.fish" { nativeBuildInputs = [ pkgs.babelfish ]; - } "babelfish < ${path} > $out;"; + } "exec -a ${lib.getExe pkgs.babelfish} babelfish < ${path} > $out;"; in { options = {