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

packages output supposed to only contain derivations #60

Open
kanashimia opened this issue Nov 28, 2021 · 5 comments · Fixed by #87
Open

packages output supposed to only contain derivations #60

kanashimia opened this issue Nov 28, 2021 · 5 comments · Fixed by #87
Labels
enhancement New feature or request

Comments

@kanashimia
Copy link

When you run nix flake check it complains that flake attribute 'packages.i686-linux.default' is not a derivation
Same with nix flake show:

$ nix flake show github:nix-community/fenix 
github:nix-community/fenix/e9dcb2bf01b002ccc05edf7ddcc5bbf09c9a8cd0
├───overlay: Nixpkgs overlay
└───packages
    ├───aarch64-darwin
error: expected a derivation

At this moment packages.<system> is supposed to be an attrset of derivations, it can't contain functions, nested attrsets, etc.
For the functionality of the above there is legacyPackages attribute, which nixpkgs uses, so can just switch to it.

Note: flakes are unstable, and their outputs aren't very though-out.

@figsoda figsoda added the enhancement New feature or request label Nov 28, 2021
@blaggacao
Copy link

blaggacao commented Dec 17, 2021

In a similar vein, I was also a bit surprised to find inputs.fenix.packages.x86_64-linux.fromToolchainFile instead of fenix.fromToolchainFile.

(it took me literally 1/2 hour to figure that out)

EDIT: nvm, I now am surprised what fromToolchainFile does but not anymore why it's system spaced. I may have assumed that fromToolchainFile is composable with makeRustPlatform instead of wrapping it.

@veehaitch
Copy link

veehaitch commented Dec 20, 2021

I also frequently use nix flake show to get an idea about what a flake is offering. I can very much relate to @blaggacao; it's sometimes hard to start using specific fenix features.

@figsoda
Copy link
Member

figsoda commented Aug 5, 2022

I haven't found a good way to fix the nix flake show or nix flake check issue, for now the readme have some type signatures and examples

@figsoda
Copy link
Member

figsoda commented Oct 26, 2022

I opened #87 to try to fix this issue. It doesn't restructure the outputs but it does pass nix flake check and make nix flake show much more useful

@dpc
Copy link

dpc commented Sep 28, 2023

This can be closed, I think. nix flake show works. I was surprised that it's possible to put dots in names of derivations and even

nix build github:nix-community/fenix#packages.x86_64-linux.targets.wasm32-unknown-unknown.stable.rust-std

works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants