-
Notifications
You must be signed in to change notification settings - Fork 14
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 flake show doesn't work #48
Comments
Hmmmm nix flake show doesnt like overriding.... How odd. The package builds, but nix flake show cant figure it out. nix repl is fine with it, nix shell is fine with it, every other nix command doesnt seem to care... Currently Im not sure I have an easy fix, maybe there is one, I will look at it when I get more time, but there is a workaround if it bothers you and you would rather use that as opposed to the repl. TBH I didnt notice because I always use the repl instead. So, heres what that function does. It takes your package. And then it does yourvim.override { name = "adifferentname" }; for all of your packages. Which doesn't just change the name, it selects the package. In this manner, it creates an output for all the packages. Instead of that, you can simply take the nixCatsBuilder function you make in the outputs that takes a name from package definitions and builds it, and construct the outputs yourself without using override. I just tested, nix flake show works if you construct the package outputs manually using the builder function, and it works for all the other attributes already The helper function to make all the ones from package definitions from just the package is nice and stuff, but you have access to a function that takes a name and returns a package, and you can use it all you want. Hopefully I can get time to come up with a better reply and/or fix it properly somehow very soon. I've been unexpectedly busy the last couple weeks But for now, if it matters to you, there is a workaround, otherwise, you can use nix repl to see the packages. |
Hmmm it seems like if I create the outputs set for the packages via a function AT ALL it doesnt like it... Even if I use the old version that doesnt use override... Why is it ok with overlays set being created via a function then?! Wait... hang on.... The packages are inside flake-utils... the devShell is too but thats ok cause thats just a single item But then I think nix flake show starts to get a bit confused when its already gone through the flake-utils blender and then has to process uhhhh this after that XD mkAllPackages = package: let
allnames = builtins.attrNames package.passthru.packageDefinitions;
in
listToAttrs (map (name:
lib.nameValuePair name (package.override { inherit name; })
) allnames);
mkAllWithDefault = package:
{ default = package; } // (utils.mkAllPackages package); I think we are basically just hitting the edges of nix flake shows ability to parse it... Because it DEFINITELY builds and the repl has no problem with it. Its failing to show even the x86_64-linux package outputs, and I use the one from my config daily, it definitely builds, and it builds for the config in the nixCats repo as well. The only immediate fix that is coming to my mind right now would be to literally just change the templates and recommend people make the set manually as described in my previous reply... And thats kinda lame, its a nice function. This may be a thing for some time to come, as I am not yet familiar enough with C++ to effectively go about spelunking in the For now, I would suggest using the repl to view the outputs (nix repl and then :lf . and then use the autocomplete to look around), or constructing the set of output packages manually rather than using the helper function, or maybe swapping from flake-utils to genAttrs or something To be fair, even if I remove the nixCats outputs from my personal system flake, it turns out It seems nix flake show is a touchy command... nix repl works every time. It doesnt show the descriptions from the templates, but thats right there in the installation docs anyway, and beyond that you dont really get any extra information from nix flake show comparatively. |
The title of this issue is actually EXTREMELY fitting by the way. I could have literally answered it with "correct, it does not" hahaha |
so, now this applies to the example config rather than the main flake but it still is a thing. |
I know why it is occurring. I dont know why it presented itself in some situations and not in others though. Maybe they tried to ignore such errors and missed somewhere? If it consistently failed in all cases where an output technically isnt supported by a contained package I would say its my fault, but it doesnt, it only fails if you get too complicated. It now makes sense why it only throws for package type outputs. But not why it only SOMETIMES throws for package type outputs of you get too complicated If instead of I dont really want to change that, as this is general, short, and simple, and users may decide to override the list of platforms nvim officially supports on nix. Hopefully they can finish ignoring such errors in the future in nix flake show. For now, if it bothers you, change Leaving the issue open until it doesnt happen so that others know. So, yeah. 2 workarounds. 1, use repl instead, 2, fix systems list. Up to you. |
Running
nix flake show github:BirdeeHub/nixCats-nvim
gives the following output (showing only the interesting part):There seem to be an issue with the way that the arm64 system is looking for header files according to the path.
The text was updated successfully, but these errors were encountered: