首页 > 解决方案 > GNU/GUIX 无法定位清单中指定的自定义模块

问题描述

我正在尝试guix package为以下清单运行安装:

(specifications->manifest
'("noguix-hugo" ;; A CUSTOM MODULE implemented in /module/root-1/site-lisp/nonguix-hugo.scm
  "go"))

清单中的自定义模块声明如下:

(define-module (nonguix-hugo)
  ;; implementation detail
  ;; ....
)
 

安装命令如下所示:

guix package --load-path="/module/root1/site-lisp"   \
             --load-path="/module/root-2/site-lisp"  \
             --manifest="/path/to/manifest.scm"      \
             --profile="/path/to/profile"

该命令失败并显示错误消息:

guix 包:错误:noguix-hugo:未知包

但是,构建noguix-hugousingguix build命令工作得很好

guix build   --load-path="/module/root1/site-lisp"   \
             --load-path="/module/root-2/site-lisp"  \
             nonguix-package

# The command builds and outputs the module location as expected 
# /gnu/store/7js349wb17371225njzll9gma8kmwf-nonguix-hugo-1.0

我的问题

为什么 Guix 在构建模块时成功定位模块,但在清单文件中指定时似乎无法定位模块。

我什至尝试将 a 添加(use-modules (nonguix-hugo))到 [1] 中指定的清单和设置GUIX_PACKAGE_PATH,但安装仍然失败。

参考

[1] https://guix.gnu.org/manual/en/html_node/Package-Modules.html

标签: guix

解决方案


好的,原来这是清单中的一个错字:

(specifications->manifest
'("noguix-hugo"
  "go"))

应更正为:

(specifications->manifest
  '("nonguix-hugo" ;; <= this line
    "go"))

嘘!...


推荐阅读