hermes - 💡(How to fix) Fix feat(nix): change extraPythonPackages from listOf package to functionTo

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

services.hermes-agent.extraPythonPackages = [ pkgs.python312Packages.numpy ];

---

services.hermes-agent.extraPythonPackages = ps: [ ps.numpy ];

---
RAW_BUFFERClick to expand / collapse

Problem or Use Case

extraPythonPackages (added in #15953) takes types.listOf types.package, for example:

services.hermes-agent.extraPythonPackages = [ pkgs.python312Packages.numpy ];

This forces users to know the exact Python version hermes was built with.

Proposed Solution

Conventional, when a option expect a list of non-top-level packages (like packages in python312Packages scope), the type of the option will be a function. Then it will be used like:

services.hermes-agent.extraPythonPackages = ps: [ ps.numpy ];

For example, the NixOS option "services.devpi-server.extraPackages" (https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/misc/devpi-server.nix)

Alternatives Considered

No response

Feature Type

Other

Scope

Small (single file, < 50 lines)

Contribution

  • I'd like to implement this myself and submit a PR

Debug Report (optional)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix feat(nix): change extraPythonPackages from listOf package to functionTo