{ python3, writeTextFile, lib, }: { name, text, runtimePackages ? ps: [], pythonPackage ? python3, meta ? {}, passthru ? {}, derivationArgs ? {}, }: let pythonWithPackages = pythonPackage.withPackages runtimePackages; in writeTextFile { inherit name meta passthru derivationArgs ; executable = true; destination = "/bin/${name}"; allowSubstitutes = true; preferLocalBuild = false; text = '' #!${lib.getExe pythonWithPackages} ${text} ''; }