What is Nostr?
sh1marin /
npub1w84…pmwq
2024-01-03 16:14:02

sh1marin on Nostr: TIL: nix search 只会搜索最顶层的 attr set 里有没有 type == ...

TIL: nix search 只会搜索最顶层的 attr set 里有没有 type == derivation,会遇到其无法展示某个子 attribute set 里的 derivation 定义。这种情况下如果想搜索某个子 attr set 里的 derivation,可以从上到下的加上一个 attribute recurseForDerivation = true,然后 nix search 就会往里搜了。

比如说 { a = drv; b = { c = drv; }; },可以在顶层加上上述 attribute,变成 { recurseForDerivation = true; a = drv; b = { c = drv; }; } 之后,用 nix search 就能展示 b.c 这个 derivation 了。
Author Public Key
npub1w849e8v77ncpc8ktrggk7lg4l7ex5fqkyzlj3jzkty6j8f0gah9sstpmwq