any-nix-shell
any-nix-shell copied to clipboard
Error when setting up ZSH
This fails on mac
$ any-nix-shell --info-right | source /dev/stdin
ERROR: wrong usage
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Use GNU sed and everything should work fine:
nix-env -iA nixpkgs.gnused
Use GNU sed and everything should work fine:
nix-env -iA nixpkgs.gnused
Would this be fixed by replacing -r
by -E
?
This issue is solved after #22 when you package with
{
buildInputs = with pkgs; [ bash gnused ];
installPhase = with pkgs; ''
mkdir -p $out/bin
cp -r bin $out
wrapProgram $out/bin/any-nix-shell --prefix PATH : $out/bin:${lib.makeBinPath buildInputs}
'';
}
The next downstream (i.e., nixpkgs) package update will contain this fix.