I am looking for `pkgs.runShellScript`

you could write your script in a local file and add it to the nix shell