-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
error: attribute 'x86_64-linux' in selection path '"x86_64-linux"' not found
building 3.0.0
#354
Comments
How are you building the package exactly? In my case it just works (for this command to work, you need to have flake enabled):
|
I don't have flakes enabled, since they are not a stable feature yet. Does Alejandra not work without flakes? |
It does, flake is just quicker for me to test and it more deterministic since everybody uses exactly the same source.
You can enable flake temporarily if needed:
So unless you explain how you are building alejandra we cannot help you. |
I'm building it by running |
Oh ok now everything is clear (sorry, I never used alejandra before, and I was not even aware of the existence of pre-commit). So I can confirm, this is a bug from alejandra's side, sorry for my previous messages (next time give maybe a bit more context ^^). So basically when you call
so the I just created a PR here I guess you should be able to test it using my fork instead of the main project. |
Thank you very much, @tobiasBora! Your fix does indeed work, I just had to add |
Do you plan to release a new version of alejandra, so that a pre-commit configuration without prerequisites can work out-of-the-box? Currently, the setup fails with the error in question, e.g. $ uv run pre-commit
alejandra (Nix)..........................................................Failed
- hook id: alejandra
- exit code: 1
+ command -v nix-build
/nix/var/nix/profiles/default/bin/nix-build
+ !command -v nix-instantiate
/home/peter/.cache/pre-commit/repoe9izwwkz/.pre-commit-entry.sh: 10: !command: not found
+ echo INFO: computing current system
INFO: computing current system
+ nix-instantiate --eval --expr builtins.currentSystem
+ system="x86_64-linux"
+ echo INFO: building Alejandra
INFO: building Alejandra
+ nix-build --attr "x86_64-linux" --out-link result-alejandra https://github.com/kamadorueda/alejandra/tarball/3.0.0
error: attribute 'x86_64-linux' in selection path '"x86_64-linux"' not found Note that for the current |
@bittner I just released 3.1.0. Please let me know if this fixes the issues you mention. The |
Looks good, works fine with |
With the latest unstable nixpkgs
and latest alejandra
alejandra fails to build on NixOS 22.05:
The text was updated successfully, but these errors were encountered: