Skip to content

Allow expressions within -p #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tobiasBora opened this issue Apr 16, 2025 · 0 comments
Open

Allow expressions within -p #485

tobiasBora opened this issue Apr 16, 2025 · 0 comments

Comments

@tobiasBora
Copy link

tobiasBora commented Apr 16, 2025

With nix-shell, I can run:

$ nix-shell -p "(python312.withPackages (ps: [ps.picos]))" -p "(python313.withPackages (ps: [ps.picos]))"

but I cannot run:

$ nixpkgs-review pr 398351 -p "(python312.withPackages (ps: [ps.picos]))" -p "(python313.withPackages (ps: [ps.picos]))"                                                                                                   
  $ git -c fetch.prune=false fetch --no-tags --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/398351/merge:refs/nixpkgs-review/1
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 3 (from 1)
Dépaquetage des objets: 100% (7/7), 21.94 Kio | 2.19 Mio/s, fait.
Depuis https://github.com/NixOS/nixpkgs
   472b4108d146..4513971596cb  master     -> refs/nixpkgs-review/0
  $ git worktree add /home/leo/.cache/nixpkgs-review/pr-398351-17/nixpkgs e980bd7639e26f4d2362fd9f2df3ee6b8d9cff6f
Préparation de l'arbre de travail (HEAD détachée e980bd7639e2)
Mise à jour des fichiers: 100% (47312/47312), fait.
HEAD est maintenant à e980bd7639e2 Merge 894c9f8bd0ae7f3c661fcf91942eaf3023e22048 into 472b4108d146d56eafdedaa30bb9376c4d139f89
warning: ignoring the client-specified setting 'system', because it is a restricted setting and you are not a trusted user
warning: ignoring the client-specified setting 'system', because it is a restricted setting and you are not a trusted user
These packages do not exist:
(python312.withPackages (ps: [ps.picos])) (python313.withPackages (ps: [ps.picos]))
  $ git worktree remove -f /home/leo/.cache/nixpkgs-review/pr-398351-17/nixpkgs

As I get an error These packages do not exist. However, nixpkgs-review already allow stuff like:

$ nixpkgs-review pr 398351 -p python312Packages.picos

so it would be cool to allow more complex expressions here like in nix-shell, especially for languages/editors that need a wrapper.

See also motivations in #484

@tobiasBora tobiasBora changed the title Allow expressions with -p Allow expressions within -p Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant