!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

323 Members
https://github.com/nix-community/poetry2nix62 Servers

Load older messages


SenderMessageTime
6 Nov 2023
@k900:0upti.meK900It is here: https://github.com/nix-community/poetry2nix/blob/master/default.nix#L233-L28520:43:19
@k900:0upti.meK900 Any poetry2nix overrides are applied on top of nixpkgs overrides 20:43:27
@matthewcroughan:defenestrate.itmatthewcroughan oh, so it's always being overlayed on top? 20:44:10
@matthewcroughan:defenestrate.itmatthewcroughaninvisibly by the code you just linked 20:44:37
@k900:0upti.meK900Yes, and it's not "invisible"20:45:08
@k900:0upti.meK900It is very much visible in the very code I just linked20:45:16
@matthewcroughan:defenestrate.itmatthewcroughanI mean, can you forgive me for being confused by it?20:45:16
@matthewcroughan:defenestrate.itmatthewcroughanthere is a few thousand line overrides file, I thought it was all manual20:45:35
@k900:0upti.meK900 No, that is all on top of what nixpkgs does 20:45:57
@matthewcroughan:defenestrate.itmatthewcroughanso has it happened before that there was no nix package, but only a poetry2nix automated derivation, and then nixpkgs added a drv, and it broke poetry2nix?20:46:41
@k900:0upti.meK900Yes20:47:14
@k900:0upti.meK900It has also happened that nixpkgs updated fixups for a package and that caused issues20:47:28
@k900:0upti.meK900This is kind of unavoidable unless we want to encode historical knowledge into nixpkgs20:47:43
@matthewcroughan:defenestrate.itmatthewcroughanWhy might I need to add nativeBuildInputs that nixpkgs already has?20:51:02
@matthewcroughan:defenestrate.itmatthewcroughan
                gradio = super.gradio-client.overridePythonAttrs
                  (
                    old: {
                      nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ super.hatch-requirements-txt super.hatch-fancy-pypi-readme ];
                    }
                  );
                gradio-client = super.gradio-client.overridePythonAttrs
                  (
                    old: {
                      nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ super.hatch-requirements-txt super.hatch-fancy-pypi-readme ];
                    }
                  );

20:51:06
@matthewcroughan:defenestrate.itmatthewcroughanAs an example, I have gradio, gradio-client, but nixpkgs already has these nativeBuildInputs, I'm having to add them back in20:51:23
@k900:0upti.meK900This makes zero sense20:51:51
@k900:0upti.meK900You're adding an empty list20:51:56
@matthewcroughan:defenestrate.itmatthewcroughanah.. I copied from some template code 20:52:10
@matthewcroughan:defenestrate.itmatthewcroughanand I didn't notice that 20:52:16
@matthewcroughan:defenestrate.itmatthewcroughanWait, re-reading it again even, that's not supposed to be an empty list20:53:17
@matthewcroughan:defenestrate.itmatthewcroughan

old.nativeBuildInputs is supposed to be :

  nativeBuildInputs = [
    hatchling
    hatch-requirements-txt
    hatch-fancy-pypi-readme
  ];
20:53:31
@matthewcroughan:defenestrate.itmatthewcroughan *

old.nativeBuildInputs is supposed to be :

  nativeBuildInputs = [
    hatchling
    hatch-requirements-txt
    hatch-fancy-pypi-readme
  ];

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/gradio/client.nix#L62C1-L66C5

20:53:47
@matthewcroughan:defenestrate.itmatthewcroughanand then if not, it will be an empty list, and then my deps, am I misreading something?20:54:08
@k900:0upti.meK900Are you sure you're using a recent enough nixpkgs?20:54:33
@k900:0upti.meK900That package does not exist in 23.0520:54:40
@k900:0upti.meK900And is two months old in unstable20:54:44
@matthewcroughan:defenestrate.itmatthewcroughan 85f1ba3e51676fa8cc604a3d863d729026a6b8eb 20:55:08
@matthewcroughan:defenestrate.itmatthewcroughan
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    poetry2nix = {
      url = "github:pegasust/poetry2nix/orjson";
      inputs.nixpkgs.follows = "nixpkgs";
    };

20:55:22
@k900:0upti.meK900What is that poetry2nix branch20:55:32

Show newer messages


Back to Room ListRoom Version: 6