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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix nix print-dev-env
& nix develop
with drv paths
#8310
Conversation
I'm not sure if I get this. Why should |
Case in point, $ nix run github:obsidiansystems/nix/fix-8141 -- develop "$(nix eval --raw nixpkgs#hello.drvPath)"
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/m7clchh41sryqpiz6x4mbrwhv4n08k3g-hello-2.12.1.drv^*'
error: installable '/nix/store/m7clchh41sryqpiz6x4mbrwhv4n08k3g-hello-2.12.1.drv' does not correspond to a Nix language value
Try '/nix/store/bd3wxql9rbdidghkbwrgyfz6zr5a970z-nix-2.16.0pre20230509_55e3715/bin/nix --help' for more information. |
Oh, I thought |
Oops, yes that is indeed the case. |
Fixes NixOS#8309 This regression was because both `CmdDevelop` and `CmdPrintDevEnv` were switched to be `InstallableValueCommand` subclasses, but actually neither should have been. The `nixpkgsFlakeRef` method should indeed not be on the base installable class, because "flake refs" and "nixpkgs" are not installable-wide notions, but that doesn't mean these commands should only accept installable values.
nix print-dev-env
with drv pathsnix print-dev-env
& nix develop
with drv paths
OK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that looks great!
Thanks a lot for the expedited fixing! Can we back-port this for 2.15, so that installers such as DetSys Installer would not default to a unfixed version? |
Added the label to do so. |
Successfully created backport PR for |
Motivation
Fixes #8309
Context
This regression was because both
CmdDevelop
andCmdPrintDevEnv
were switched to beInstallableValueCommand
subclasses, but actually neither should have been.The
nixpkgsFlakeRef
method should indeed not be on the base installable class, because "flake refs" and "nixpkgs" are not installable-wide notions, but that doesn't mean these commands should only accept installable values.Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.sh
src/*/tests
tests/nixos/*
Priorities
Add 馃憤 to pull requests you find important.