!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

320 Members
https://github.com/nix-community/poetry2nix61 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
21 Mar 2024
@vengmark2:matrix.orgl0b0 Is it just me or is poetry2nix still much simpler in Nix shell than using flakes? 02:05:17
@vengmark2:matrix.orgl0b0 * Is it just me or is poetry2nix still much simpler in Nix shell than using flakes? In flakes there seems to be these extra inputs.nixpkgs.follows = "nixpkgs"; and poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) steps which seem redundant. 02:06:27
@charles:computer.surgeryCharlesjust don't do the former02:58:16
@vengmark2:matrix.orgl0b0I can't find any good documentation of any of this, so I've just reverted to using Nix shells. Much simpler.03:05:23
@charles:computer.surgeryCharles of what, follows? 03:06:39
@vengmark2:matrix.orgl0b0 How to use poetry2nix with flakes. This doesn't really explain anything. 03:07:46
@vengmark2:matrix.orgl0b0 I tried using it, and the resulting config is much more complex than a Nix shell. 03:08:13
@charles:computer.surgeryCharleshttps://github.com/nix-community/poetry2nix/blob/3c92540611f42d3fb2d0d084a6c694cd6544b609/templates/app/flake.nix#L1803:08:57
@charles:computer.surgeryCharles i do poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }; though so i can reuse poetry2nix instead of just the 1 builder 03:09:33
@vengmark2:matrix.orgl0b0Still doesn't explain anything.03:09:42
@vengmark2:matrix.orgl0b0 Why is there even a mkPoetry2Nix? Why would it not be enough to use poetry2nix directly? 03:10:13
@charles:computer.surgeryCharles then instead of https://github.com/nix-community/poetry2nix/blob/3c92540611f42d3fb2d0d084a6c694cd6544b609/templates/app/flake.nix#L22 you would do poetry2nix.mkPoetryApplication to refer to the binding i mentioned in my previous message 03:10:16
@charles:computer.surgeryCharles
In reply to @vengmark2:matrix.org
Why is there even a mkPoetry2Nix? Why would it not be enough to use poetry2nix directly?
because they want to take pkgs explicitly to function kinda like an overlay
03:10:32
@charles:computer.surgeryCharlesinstead of using its own instance of nixpkgs03:10:38
@vengmark2:matrix.orgl0b0 Isn't inputs.nixpkgs.follows = "nixpkgs"; explicit enough? 03:11:55
@vengmark2:matrix.orgl0b0It probably does something completely different, but as a developer this whole syntax is incredibly confusing.03:12:29
@charles:computer.surgeryCharlesthat is different03:12:47
@vengmark2:matrix.orgl0b0 Nothing should need to take two references to something else. 03:12:55
@charles:computer.surgeryCharlesthat's a different instance of the same nixpkgs03:13:01
@vengmark2:matrix.orgl0b0That's bad DX03:13:15
@charles:computer.surgeryCharles the difference being that overlays you apply to your own pkgs would not be observable by poetry2nix (or any other flake input) 03:13:28

Show newer messages


Back to Room ListRoom Version: 6