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
Flake's overlay should use prev
instead of inputs.nixpkgs...
?
#20
Comments
I think a PR could explain better what you actually want 😅 ? |
ok ok :) I'll do that tomorrow (it's too late in france rn) |
But after re-reading your comment. Yeah, you're completely right 😅 . I am not sure why I got to this code. I do remember that it was kinda difficult to get Anyway, PRs are welcome. |
Fixed with commit f313de0. The overlay now uses Also, I had misunderstood before what |
Thanks @thiagokokada ! overlay =
final: prev:
import ./default.nix {
poetry2nix = (poetry2nix.overlay prev final).poetry2nix;
pkgs = prev;
inherit (prev.stdenv.hostPlatform) system;
rev = if (self ? rev) then self.rev else "dirty";
}; I didn't know about It means that, when only using the overlay, one can use as inputs: nix-alien = {
url = "path:/home/paulg/git/nix-alien";
inputs.nixpkgs.follows = ""; # good enough for type-check but ensure that it is not used
}; Why I want that? |
Well, PRs are welcome them. |
Not sure if this is really a problem. You can pin any one of them and it should work anyway.
It will only pull another one if you don't set |
I'm not sure I get that. What I mean is that if I want my machines to only depend on one channel at a time, I need to do something like this: inputs = {
nixos-21.11.url= "...";
nixos-21.11-small.url= "...";
nixos-unstable.url= "...";
nixos-unstable-small.url= "...";
nix-alien-21.11 = {
url = "path:/home/paulg/git/nix-alien";
inputs.nixpkgs.follows = "nixos-21.11";
};
nix-alien-21.11-small = {
url = "path:/home/paulg/git/nix-alien";
inputs.nixpkgs.follows = "nixos-21.11-small";
};
nix-alien-unstable = {
url = "path:/home/paulg/git/nix-alien";
inputs.nixpkgs.follows = "nixos-unstable";
};
nix-alien-unstable-small = {
url = "path:/home/paulg/git/nix-alien";
inputs.nixpkgs.follows = "unstable-small";
};
};
outputs = inputs: {
nixosConfigurations = {
a = { ... ; overlays = inputs.nix-alien-21.11; ...}
b = { ... ; overlays = inputs.nix-alien-21.11-small; ...}
c = { ... ; overlays = inputs.nix-alien-unstable; ...}
d = { ... ; overlays = inputs.nix-alien-unstable-small; ...}
};
} |
The flake's overlay should use
prev
instead ofinputs.nixpkgs...
?Maybe I'm mistaken about what is expected from overlays, but I thought overlays should work this way and not pull
pkgs
from the outside.Anyway, it makes integration with my system a bit harder, the only solution I found so far is to directly use
pkgs.callPackage
onnix-alien.nix
to force the use of my system'spkgs
.Maybe my needs are weirds also, I can explain more if needed :)
The text was updated successfully, but these errors were encountered: