nix - value 是一个函数,而在评估“输出”时需要一个集合
问题描述
尝试检查薄片时出现上述错误;我正在尝试flake-compat
在非 NixOS 系统上使用以兼容home-manager
.
这是导致以下跟踪的薄片:
error: value is a function while a set was expected
at /nix/store/l22dazwy8cgxdvndhq45br310nap92x3-source/etc/nixos/flake.nix:167:136:
166|
167| outputs = inputs@{ self, nix, nixpkgs, flake-utils, flake-compat, ... }: with builtins; with nixpkgs.lib; with flake-utils.lib; let
|
^
168|
… while evaluating 'outputs'
at /nix/store/l22dazwy8cgxdvndhq45br310nap92x3-source/etc/nixos/flake.nix:167:15:
166|
167| outputs = inputs@{ self, nix, nixpkgs, flake-utils, flake-compat, ... }: with builtins; with nixpkgs.lib; with flake-utils.lib; let
| ^
168|
… from call site
at «string»:45:21:
44|
45| outputs = flake.outputs (inputs // { self = result; });
| ^
46|
… while evaluating anonymous lambda
at «string»:10:13:
9| builtins.mapAttrs
10| (key: node:
| ^
11| let
… from call site
… while evaluating the attribute 'root'
… while evaluating anonymous lambda
at «string»:2:23:
1|
2| lockFileStr: rootSrc: rootSubdir:
| ^
3|
… from call site
不幸的是,我不能提供一个minimal reproducible example
,因为我不知道这个错误是从哪里产生的。
解决方案
事实证明,我的lib
值实际上是一个函数;不幸的是,由于nix flakes
仍然不稳定,它并没有完全显示发生这种情况的位置。
推荐阅读
- java - 从另一个类访问变量(Java)
- julia - 朱莉娅 | 在二维数组中推送或追加
- python - 无法使用 Flask、MySQL 更新记录
- c# - 以编程方式从 Azure 订阅中删除用户 (C#)
- sharepoint - SharePoint 2013 列表 - 列索引、列表阈值限制、REST api
- sql - Access 2010 SQL 查询选择带有临时表的内部联接
- c# - 如何在 PuppeteerSharp 中等待异步函数评估
- php - Doctrine - 在 From 中进行子选择
- python - 浮点错误的发生以及如何防止它们
- javascript - React Native 中的 Promise