Map Distance Scales to GGplot2 lat / lon map?

Now that Maptools has been retired, does anyone have a good tool for adding a scale bar to a lat / lon map where distance units may be miles, km or nautical miles?

Although gspatial provides a quick way to generate a scalebar such as shown below, the choice of units is severely limited. ```
ggplot(data = tanzania) +
geom_sf() +
xlab("Longitude") + ylab("Latitude") +
ggtitle("The United Republic of Tanzania") +
annotation_scale(location = "bl", width_hint = 0.4) +
annotation_north_arrow(location = "bl", which_north = "true",
pad_x = unit(0.0, "in"), pad_y = unit(0.2, "in"),
style = north_arrow_fancy_orienteering)

So far, this is the closest that I can come but I am unable to generate the desire units.

library(ggplot2)
library(rnaturalearth)
library(sf)

Load the coastline data

coastline <- ne_countries(scale = "medium", returnclass = "sf")
gnm <- ne_countries(scale = "medium", country = "United States of America", returnclass = "sf")

Define longitude and latitude limits

box =c(xmin = -100 , ymin = 20 , xmax = -80 , ymax = 40)

Filter coastline data for Gulf of Mexico area

gulf_coastline = st_crop(coastline, box)

Create the plot

gulf_plot <- ggplot() +
geom_sf(data = gulf_coastline, fill = "lightblue", color = "black") +
coord_sf(xlim = lon_range, ylim = lat_range) +
theme_minimal() +
ggtitle("Gulf of Mexico") +
xlab("Longitude") + ylab("Latitude") +
theme(panel.grid.major = element_line(color = "white")) +
annotation_scale(location = "bl", width_hint = 0.5)

Print the plot

print(gulf_plot)