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

nix-env -qP does not quote attributes that need to be quoted #1342

Closed
ahmedtd opened this issue Apr 18, 2017 · 3 comments
Closed

nix-env -qP does not quote attributes that need to be quoted #1342

ahmedtd opened this issue Apr 18, 2017 · 3 comments

Comments

@ahmedtd
Copy link

ahmedtd commented Apr 18, 2017

nix-env -qP doesn't quote components of attribute paths that need to be quoted.

For example, the attribute lispPackages."hu.dwim.asdf" is output as lispPackages.hu.dwim.asdf. Trying to use the output directly results in the error:

error: attribute ‘hu’ in selection path ‘nixos.lispPackages.hu.dwim.asdf’ not found

This breaks tools that consume nix-env output (nox-review, for example, dies if the change requires a rebuild of lispPackages."hu.dwim.asdf")

@edolstra
Copy link
Member

Attribute names should not contain dots. This is a bug in Nixpkgs, which should not use hu.dwim.asf as an attribute name.

@copumpkin
Copy link
Member

copumpkin commented Apr 19, 2017 via email

@7c6f434c
Copy link
Member

If attribute names should not contain dots, what is the rationale for the attribute name quoting syntax in Nix (that also doesn't warn about wrong names)? Is it a bug that converting list to attribute set doesn't complain on wrong names? I always thought it was added exactly to support sane attribute naming of packages with upstream names starting with a digit.

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

4 participants