Skip to content
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

Treat plain derivation paths in context as normal paths. #2626

Merged
merged 1 commit into from Feb 12, 2019

Conversation

@shlevy
Copy link
Member

@shlevy shlevy commented Jan 13, 2019

Previously, plain derivation paths in the string context (e.g. those
that arose from builtins.storePath on a drv file, not those that arose
from accessing .drvPath of a derivation) were treated somewhat like
derivaiton paths derived from .drvPath, except their dependencies
weren't recursively added to the input set. With this change, such
plain derivation paths are simply treated as paths and added to the
source inputs set accordingly, simplifying context handling code and
removing the inconsistency. If drvPath-like behavior is desired, the
.drv file can be imported and then .drvPath can be accessed.

This is a backwards-incompatibility, but storePath is never used on
drv files within nixpkgs and almost never used elsewhere.

@shlevy shlevy requested a review from edolstra Jan 13, 2019
@shlevy
Copy link
Member Author

@shlevy shlevy commented Jan 13, 2019

If preferred, I have a patch fixing the inconsistency the other way at https://github.com/shlevy/nix/tree/fix-drv-storePath-drvPath-like (shlevy@89c47e8)

Previously, plain derivation paths in the string context (e.g. those
that arose from builtins.storePath on a drv file, not those that arose
from accessing .drvPath of a derivation) were treated somewhat like
derivaiton paths derived from .drvPath, except their dependencies
weren't recursively added to the input set. With this change, such
plain derivation paths are simply treated as paths and added to the
source inputs set accordingly, simplifying context handling code and
removing the inconsistency. If drvPath-like behavior is desired, the
.drv file can be imported and then .drvPath can be accessed.

This is a backwards-incompatibility, but storePath is never used on
drv files within nixpkgs and almost never used elsewhere.
@shlevy shlevy force-pushed the fix-drv-storePath-path-like branch from ffc492a to 087be72 Jan 13, 2019
@shlevy shlevy mentioned this pull request Jan 14, 2019
@edolstra edolstra merged commit 087be72 into NixOS:master Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants