nix - 如何在 nix 包管理器中修改特定派生选项
问题描述
我想修改 Nix 派生(emacs macport)的定义。我希望将configureFlag
值和“--with-mac-metal”更改为它。
我试过以下没有运气:
emacsMacport.overrideDerivation
(old: {
configureFlags = [
"LDFLAGS=-L${ncurses.out}/lib"
"--with-xml2=yes"
"--with-gnutls=yes"
"--with-mac"
"--with-modules"
"--enable-mac-app=$$out/Applications"
"--with-mac-metal"
];
})
我正在使用 home-manager 和 nix-darwin,但出现以下异常:
error: A definition for option `home-manager.users.ashk.home.packages.[definition 16-entry 3]' is not of type `package'. Definition values:
- In `/nix/store/mkcwa9i9brbxf81a01whhy53yzk87c9d-source/modules/hosts/zebra/home.nix': <function>
(use '--show-trace' to show detailed location information)
解决方案
当函数应用程序位于列表文字中时,您需要用括号括起来。有点奇怪。
从我多年来广泛使用 Nix 的经验来看,你可能永远不会习惯这一点。
推荐阅读
- r - 用R解析xml数据。代码很慢。如何让它更快?
- java - 使用字符串生成器追加
- python - 我想计算数据集中的精度、召回率和准确率
- java - 注册不是封闭类
- python - 从 MySQL 5.5 升级到 5.7 后查询更频繁地遇到死锁
- node.js - 使用 raspberryPi 相机 nodeJS 进行 QR 扫描
- c - 为什么char指针在C中保存数据多于分配的内存?
- xamarin.forms - Xamarin Forms:标签文本有时仅在 UI 上显示第一个单词
- javascript - Error.stack 仅引用 main.chunk.js 而不是真实文件名
- vue.js - Vue.js 多复选框过滤器