Next: , Previous: , Up: 打包指导   [Contents][Index]


22.4.2 软件包命名

一个软件包事实上有两个名字:第一个是Scheme变量的名字,即用define-public定义的名字。通过这个名字,软件包可以被Scheme代码找到,如用作其它软件包的输入。第二个名字是软件包定义里的name属性的字符串值。这个名字用于软件包管理命令,如:guix packageguix build

两个名字通常是相同的,常是上游项目名字转成小写字母并把下划线替换成连字符的结果。比如,GNUnet转成gnunet,SDL_net转成sdl-net

A noteworthy exception to this rule is when the project name is only a single character, or if an older maintained project with the same name already exists—regardless of whether it has already been packaged for Guix. Use common sense to make such names unambiguous and meaningful. For example, Guix’s package for the shell called “s” upstream is s-shell and not s. Feel free to ask your fellow hackers for inspiration.

我们不给库软件包添加lib前缀,除非它是项目官方名字的一部分。但是see Python模块Perl模块有关于Python和Perl语言的特殊规则。

字体软件包的名字处理起来不同,see 字体.