几种方法。
- 官方: https://search.nixos.org/packages
- 非官方: https://history.nix-packages.com/
- 在 nixpkgs 源码
pkgs/top-level/all-packages.nix
,可以看到所有包名。
devbox 推出了 https://www.nixhub.io/ 搜索服务。
三种解决方案:
- 同时使用不同版本的 nixpkgs。
- 使用 overlay。
- 用 overrideAttrs 覆盖 nixpkgs 的包属性。
具体参考这篇文章。
因为这个 hash 是 nix derivation 的计算结果,不是包文件的 hash。
The fact that the hash belongs to the Nix derivation output and not the file itself can lead to confusion.