| 6 Nov 2023 |
matthewcroughan | I have had to do this, so often, just removing lines that don't effect the build at all | 20:38:15 |
matthewcroughan | ah no, nixpkgs has this https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/python-modules/gradio/client.nix#L8C3-L8C25 | 20:39:14 |
matthewcroughan | K900 ⚡️: okay so in this case, there is a drv in nixpkgs. But the poetry overrides don't use it. And I can't just use the one from nixpkgs due to collision/mismatch in dependency graph. | 20:40:05 |
K900 | No, that's false | 20:40:11 |
K900 | The poetry overrides do use it | 20:40:16 |
K900 | I know because I wrote that fucking code and please don't tell me what it doesn't do | 20:40:31 |
matthewcroughan | I did a ctrl + f for gradio in github.com/nix-community/poetry2nix/blob/master/overrides/default.nix | 20:40:37 |
K900 | So? | 20:40:46 |
matthewcroughan | So where is it if it exists, and I am not sure why you think I am telling you what your code does or doesn't do. | 20:41:03 |
K900 | It is here: https://github.com/nix-community/poetry2nix/blob/master/default.nix#L233-L285 | 20:43:19 |
K900 | Any poetry2nix overrides are applied on top of nixpkgs overrides | 20:43:27 |
matthewcroughan | oh, so it's always being overlayed on top? | 20:44:10 |
matthewcroughan | invisibly by the code you just linked | 20:44:37 |
K900 | Yes, and it's not "invisible" | 20:45:08 |
K900 | It is very much visible in the very code I just linked | 20:45:16 |
matthewcroughan | I mean, can you forgive me for being confused by it? | 20:45:16 |
matthewcroughan | there is a few thousand line overrides file, I thought it was all manual | 20:45:35 |
K900 | No, that is all on top of what nixpkgs does | 20:45:57 |
matthewcroughan | so 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 | Yes | 20:47:14 |
K900 | It has also happened that nixpkgs updated fixups for a package and that caused issues | 20:47:28 |
K900 | This is kind of unavoidable unless we want to encode historical knowledge into nixpkgs | 20:47:43 |
matthewcroughan | Why might I need to add nativeBuildInputs that nixpkgs already has? | 20:51:02 |
matthewcroughan | 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 | As an example, I have gradio, gradio-client, but nixpkgs already has these nativeBuildInputs, I'm having to add them back in | 20:51:23 |
K900 | This makes zero sense | 20:51:51 |
K900 | You're adding an empty list | 20:51:56 |
matthewcroughan | ah.. I copied from some template code | 20:52:10 |
matthewcroughan | and I didn't notice that | 20:52:16 |
matthewcroughan | Wait, re-reading it again even, that's not supposed to be an empty list | 20:53:17 |