!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

330 Members
https://github.com/nix-community/poetry2nix63 Servers

Load older messages


SenderMessageTime
26 Oct 2023
@k900:0upti.meK900Yeah14:20:24
@k900:0upti.meK900Those are also IFD14:20:26
@k900:0upti.meK900But also, now that we're about to not be in nixpkgs anymore, maybe we should just give up14:20:38
@k900:0upti.meK900And allow IFD by default14:20:42
@k900:0upti.meK900It will solve most of the Cargo.lock issues and it will also solve most of the buildsystem overrides because we can just look at the pyproject.toml14:21:00
@pcloud:matrix.orgcpcloudBeing able to look at build systems would be realllllly nice 14:22:25
@schmittlauch:ohai.isschmittlauch (he/him) Hm, removing legacyPackages.poetry2nix from the flake in the latest update broke my setup after re-locking. Not too bad to fix, but unexpected. I guess I ended up with that legacyPackages reference in the first place due to starting with a generic python template that took poetry2nix` from the nixpkgs input, and then transitioned to using the poetry2nix flake. 21:08:44
@schmittlauch:ohai.isschmittlauch (he/him) For reproducing https://github.com/nix-community/poetry2nix/issues/1351 with the latest master HEAD, I am struggling a bit to rework my flake to use poetry2nix. How do I now get the poetry2nix builders like mkPoetryEnv? 21:21:35
@schmittlauch:ohai.isschmittlauch (he/him)

The template uses

      let
        # see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
        pkgs = nixpkgs.legacyPackages.${system};
        inherit (import poetry2nix { inherit pkgs; }) mkPoetryApplication;

but I do not fully understand how this works in the background. Does this utilise the overlay output of the poetry2nix flake?

21:23:00
@k900:0upti.meK900 import poetry2nix { inherit pkgs; } 21:23:06
@k900:0upti.meK900No21:23:14
@k900:0upti.meK900It just creates an instance of poetry2nix that's not overlayed anywhere21:23:34
@k900:0upti.meK900It's standalone21:23:36
@schmittlauch:ohai.isschmittlauch (he/him) Is poetry2nix specified as an output of that flake? 21:23:59
@schmittlauch:ohai.isschmittlauch (he/him)Or how is it exposed as a name/ attr?21:24:16
@k900:0upti.meK900 No, poetry2nix is the flake input 21:24:19
@k900:0upti.meK900So it'll resolve to the path of the poetry2nix repo21:24:27
@k900:0upti.meK900And it will import its default.nix21:24:54
@k900:0upti.meK900Which is defined like this: https://github.com/nix-community/poetry2nix/blob/master/default.nix21:24:57
@schmittlauch:ohai.isschmittlauch (he/him)Yes, but when reading through the actual poetry2nix flake.nix file in the repo I do not understand what actually is imported there.21:25:15
@k900:0upti.meK900 default.nix is what is imported 21:25:55
@schmittlauch:ohai.isschmittlauch (he/him)Oh well, is this a crude workaround or an actual intended way of using this?21:26:13
@k900:0upti.meK900We might export it as a function in the flake eventually21:26:40
@k900:0upti.meK900 Similar to say nixpkgs.lib.nixosSystem 21:26:46
@schmittlauch:ohai.isschmittlauch (he/him)I thought the main idea is that you only reference explicit outputs of other flakes21:26:50
@k900:0upti.meK900But it is a perfectly fine way to use this21:26:53
@schmittlauch:ohai.isschmittlauch (he/him)Okay. thx.21:27:10
@k900:0upti.meK900And it's better than the old way because it avoids yet another nixpkgs instance21:27:15
* @schmittlauch:ohai.isschmittlauch (he/him) is still a bit weirded out but starts to understand 21:27:35
@schmittlauch:ohai.isschmittlauch (he/him)
In reply to @k900:0upti.me
And it's better than the old way because it avoids yet another nixpkgs instance
Ah, that new instance only happens when using it as an overlay? I saw we now hardcode a list of permittedInsecurePackages.
21:28:19

Show newer messages


Back to Room ListRoom Version: 6