Missing attribute 'overlay'
Closed this issue · 2 comments
abdelq commented
Describe the issue
The documentation mentions an overlay that can be used to pass things to pkgs
:
pkgs = nixpkgs.legacyPackages.${system}.extend poetry2nix.overlay;
I've attempted two ways below to use that overlay. None of them work, and I get:
error: attribute 'overlay' missing
at /nix/store/xq0f0bh60g2dmxhjrhq753xcii8xi92a-source/flake.nix:13:56:
12| let
13| pkgs = nixpkgs.legacyPackages.${system}.extend poetry2nix.overlay;
Additional context
default.nix
/shell.nix
/flake.nix
:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
# Version in the docs
pkgs = nixpkgs.legacyPackages.${system}.extend poetry2nix.overlay;
# What I was trying to run before
overlays = [ poetry2nix.overlay ];
pkgs = import nixpkgs { inherit system overlays; };
in
with pkgs;
{
packages = {
default = self.packages.${system}.app;
app = mkPoetryApplication {
projectDir = self;
};
};
devShells.default = mkShell {
inputsFrom = [ self.packages.${system}.app ];
};
devShells.poetry = mkShell {
packages = [ poetry ];
};
}
);
}
abdelq commented
Looks like it should be poetry2nix.overlays.default
? FAQ should probably also be updated.
cpcloud commented
Care to submit a PR?