On this page:
4.1 SRC_  URI
url->src-uri
8.2

4 Ebuild Transformers

 (require ebuild/transformers) package: ebuild-lib

4.1 SRC_URI

 (require ebuild/transformers/src-uri)
  package: ebuild-transformers

procedure

(url->src-uri ur pn)  src-uri

  ur : path-string?
  pn : string?
Converts a URL ur path-string to a src-uri struct.

If pn is supplied also a PN (package name) detection is carried out.

Examples:
> (define racket-url "https://mirror.racket-lang.org/installers/8.1/racket-8.1-src-builtpkgs.tgz")
> (define racket-src-uri (url->src-uri racket-url "racket"))
> racket-src-uri

#<src-uri>

> (src-uri->string racket-src-uri)

"https://mirror.${PN}-lang.org/installers/8.1/${PN}-8.1-src-builtpkgs.tgz"