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

Expected that not all packages are exported? #151

Closed
mohe2015 opened this issue Mar 2, 2021 · 3 comments
Closed

Expected that not all packages are exported? #151

mohe2015 opened this issue Mar 2, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@mohe2015
Copy link

mohe2015 commented Mar 2, 2021

Expected Behavior

nix build /etc/nixos#openjdk15

should build or download the package from cache.

Current Behavior

nix build /etc/nixos#openjdk15
warning: Git tree '/etc/nixos' is dirty
error: --- Error --------------------------------------------------------------------------------------------------------------------------------------- nix
flake 'git+file:///etc/nixos' does not provide attribute 'packages.x86_64-linux.openjdk15', 'legacyPackages.x86_64-linux.openjdk15' or 'openjdk15'

Steps to Reproduce

  1. nix build /etc/nixos#openjdk15

Context

I got used to this from nixpkgs so I thought it would make sense here too.

Is there a similar command?

@mohe2015 mohe2015 added the bug Something isn't working label Mar 2, 2021
@Pacman99
Copy link
Member

Pacman99 commented Mar 2, 2021

I'm getting this too. Some of my packages work, but one or two don't. I can't seem to figure out what the difference in the ones that aren't found. The packages build and evaluate fine with just nix-build.

@nrdxp
Copy link
Collaborator

nrdxp commented Mar 3, 2021

@mohe2015 Are you saying we should output all of nixpkgs, overlays applied, like we used to.

I figured this was kinda overkill since nixpkgs was readily available and we might want to use legacyPackages for other things, such as the hmModules we are currently using it for. Maybe we could define out own custom output pkgs and install packages nix build "/etc/nixos#pkgs.openjdk.

The main question is, what is the main benefit of this over just installing from nixpkgs, since nixpkgs is pinned in the devos nix registry by default already to save a network pull and packages we modify with an overlay are exported from devos by default.

I'm getting this too. Some of my packages work, but one or two don't. I can't seem to figure out what the difference in the ones that aren't found. The packages build and evaluate fine with just nix-build.

@Pacman99, I think you're referring to a slightly different issue with the call to flattenTreeSystem, which can have strange behavior. Indeed we are going to have to replace this anyway, since it didn't make it to upstream flake-utils and the branch will probably get deleted at some point.

@mohe2015
Copy link
Author

mohe2015 commented Mar 3, 2021

@nrdxp I mainly wondered why it didn't work because I was pretty sure it did in the past. But the current behavior is fine to me. I also had some strange case where a package didn't build (jitsi-videobridge in the service module) but for some reason building jitsi-videobridge itself did work. But I assume this does not have anything to do with nixflk (maybe I was just too tired or whatever, will check again today).

I will close this issue then. Thanks for explaining!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants