Next: Tipos de letra, Previous: Crates de Rust, Up: Pautas de empaquetamiento [Contents][Index]
Elm applications can be named like other software: their names need not mention Elm.
Packages in the Elm sense (see elm-build-system
under Sistemas de construcción) are required use names of the format
author/
project, where both the author and the
project may contain hyphens internally, and the author sometimes
contains uppercase letters.
To form the Guix package name from the upstream name, we follow a convention
similar to Python packages (see Módulos Python), adding an elm-
prefix unless the name would already begin with elm-
.
In many cases we can reconstruct an Elm package’s upstream name
heuristically, but, since conversion to a Guix-style name involves a loss of
information, this is not always possible. Care should be taken to add the
'upstream-name
property when necessary so that ‘guix import elm’
will work correctly (see Invocación de guix import
). The most notable
scenarios when explicitly specifying the upstream name is necessary are:
elm
and the project contains one or
more hyphens, as with elm/virtual-dom
; and
Elm-Canvas/raster-shapes
—unless the author is
elm-explorations
, which is handled as a special case, so packages
like elm-explorations/markdown
do not need to use the
'upstream-name
property.
The module (guix build-system elm)
provides the following utilities
for working with names and related conventions:
regime required for a published Elm package with the upstream name elm-name at version version with sha256 checksum hash.
Por ejemplo:
(package
(name "elm-html")
(version "1.0.0")
(source
(elm-package-origin
"elm/html"
version
(base32 "15k1679ja57vvlpinpv06znmrxy09lbhzfkzdc89i01qa8c4gb4a")))
...)
Returns the Guix-style package name for an Elm package with upstream name elm-name.
Note that there is more than one possible elm-name for which
elm->package-name
will produce a given result.
Given an Elm package, returns the possibly-inferred upstream name, or
#f
the upstream name is not specified via the 'upstream-name
property and can not be inferred by infer-elm-package-name
.
Given the guix-name of an Elm package, returns the inferred upstream
name, or #f
if the upstream name can’t be inferred. If the result is
not #f
, supplying it to elm->package-name
would produce
guix-name.
Next: Tipos de letra, Previous: Crates de Rust, Up: Pautas de empaquetamiento [Contents][Index]