any-nix-shell icon indicating copy to clipboard operation
any-nix-shell copied to clipboard

Error when setting up ZSH

Open AlexeyRaga opened this issue 5 years ago • 2 comments

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 ...]

AlexeyRaga avatar Jun 29 '19 12:06 AlexeyRaga

Use GNU sed and everything should work fine: nix-env -iA nixpkgs.gnused

gpevnev avatar Dec 27 '19 00:12 gpevnev

Use GNU sed and everything should work fine: nix-env -iA nixpkgs.gnused

Would this be fixed by replacing -r by -E?

haslersn avatar Apr 15 '20 16:04 haslersn

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.

haslersn avatar Dec 10 '22 11:12 haslersn