Looks like your copy of flake.nix
(the file, not the code) is using DOS line endings:
❯ nix shell nixpkgs#toybox
❯ unix2dos ./flake.nix
❯ nix develop
error: builder for '/nix/store/bn0gx56rasjhx41kgm5921nk784k8496-python3.11-jina-hubble-sdk-0.39.0.drv' failed with exit code 127;
...
> /nix/store/v099hqvw5z87423p4hz1vfhzaqa07dii-stdenv-linux/setup: line 114: $'\r': command not found
> /nix/store/v099hqvw5z87423p4hz1vfhzaqa07dii-stdenv-linux/setup: line 131: pop_var_context: head of shell_variabl
...
❯ dos2unix ./flake.nix
❯ nix develop
/tmp/tmp.JzhsSBmlx8 via ❄️ impure (nix-shell-env)
❯