Originally created by @shelken on GitHub (Apr 18, 2024).
本项目 https://github.com/ryan4yin/nix-config/blob/21d85d41efed3bd6f1640efdf6f6d6f8ae5d8af2/home/base/tui/editors/packages.nix#L18
我的配置 https://github.com/shelken/nix-config/blob/c6269a6919fc378ed4854fa72b4da1b2ddbbf0b8/home/apps/neovim/packages.nix#L7
虽然我跟您的配置不完全一致,但是在只引入该包的情况下,在我的电脑上(darwin),直接运行 go run . 发现以下错误:
go run .
# runtime/cgo cgo-builtin-prolog:1:10: fatal error: 'stddef.h' file not found #include <stddef.h> ^~~~~~~~~~ 1 error generated
去掉就正常了。不知道你是否能复现?
@ryan4yin commented on GitHub (Apr 18, 2024):
+1 成功复现...
有可能是 unstable 的 clang 有不兼容变更,然后我 darwin 用的是 nixpkgs-23.11-darwin 不是 unstable 从而导致问题。 但 unstable + darwin 坏掉的东西太多了,只能先注释掉,然后等 24.05 发布后再试试了
@imxyy1soope1 commented on GitHub (Apr 26, 2024):
大概是因为llvmPackages.clang-unwrapped,并且clang-unwrapped把原本的cc覆盖掉了,导致编译时找不到include path,可以换用clang-tools
llvmPackages.clang-unwrapped
clang-unwrapped
clang-tools
@ryan4yin commented on GitHub (Apr 28, 2024):
@imxyy1soope1 嗯应该是这样
@ryan4yin commented on GitHub (Jun 3, 2024):
升级到 24.05 后问题仍旧存在,已经根据 @imxyy1soope1 的建议做了修改。
No dependencies set.
The note is not visible to the blocked user.
Originally created by @shelken on GitHub (Apr 18, 2024).
本项目
https://github.com/ryan4yin/nix-config/blob/21d85d41efed3bd6f1640efdf6f6d6f8ae5d8af2/home/base/tui/editors/packages.nix#L18
我的配置
https://github.com/shelken/nix-config/blob/c6269a6919fc378ed4854fa72b4da1b2ddbbf0b8/home/apps/neovim/packages.nix#L7
虽然我跟您的配置不完全一致,但是在只引入该包的情况下,在我的电脑上(darwin),直接运行
go run .发现以下错误:去掉就正常了。不知道你是否能复现?
@ryan4yin commented on GitHub (Apr 18, 2024):
+1 成功复现...
@ryan4yin commented on GitHub (Apr 18, 2024):
有可能是 unstable 的 clang 有不兼容变更,然后我 darwin 用的是 nixpkgs-23.11-darwin 不是 unstable 从而导致问题。
但 unstable + darwin 坏掉的东西太多了,只能先注释掉,然后等 24.05 发布后再试试了
@imxyy1soope1 commented on GitHub (Apr 26, 2024):
大概是因为
llvmPackages.clang-unwrapped,并且clang-unwrapped把原本的cc覆盖掉了,导致编译时找不到include path,可以换用clang-tools@ryan4yin commented on GitHub (Apr 28, 2024):
@imxyy1soope1 嗯应该是这样
@ryan4yin commented on GitHub (Jun 3, 2024):
升级到 24.05 后问题仍旧存在,已经根据 @imxyy1soope1 的建议做了修改。