| 6 Nov 2023 |
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 |
matthewcroughan | old.nativeBuildInputs is supposed to be :
nativeBuildInputs = [
hatchling
hatch-requirements-txt
hatch-fancy-pypi-readme
];
| 20:53:31 |
matthewcroughan | * 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 | and then if not, it will be an empty list, and then my deps, am I misreading something? | 20:54:08 |
K900 | Are you sure you're using a recent enough nixpkgs? | 20:54:33 |
K900 | That package does not exist in 23.05 | 20:54:40 |
K900 | And is two months old in unstable | 20:54:44 |
matthewcroughan | 85f1ba3e51676fa8cc604a3d863d729026a6b8eb | 20:55:08 |
matthewcroughan | nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
poetry2nix = {
url = "github:pegasust/poetry2nix/orjson";
inputs.nixpkgs.follows = "nixpkgs";
};
| 20:55:22 |
K900 | What is that poetry2nix branch | 20:55:32 |
matthewcroughan | something new to fix orjson that I was just trying out | 20:55:42 |
matthewcroughan | https://github.com/nix-community/poetry2nix/pull/1398 | 20:55:48 |
matthewcroughan | it's based on poetry2nix 2553decbc032504e968312cf0cb76964ca602035 so I think it's okay | 20:56:13 |
matthewcroughan | And with that, private gpt is finally packaged.. | 20:58:09 |
matthewcroughan | that took me forever. | 20:58:12 |
K900 | nix-repl> map (x: x.name) packages.x86_64-linux.chinatsu.passthru.python.pkgs.gradio-client.nativeBui
[ "python3-3.11.5" "wrap-python-hook" "ensure-newer-sources-hook" "python-remove-tests-dir-hook" "python-catch-conflicts-hook" "python-remove-bin-bytecode-hook" "pypa-build-hook.sh" "pypa-install-hook" "python-imports-check-hook.sh" "python-namespaces-hook.sh" "python-output-dist-hook" "python3.11-hatchling-1.18.0" "python3.11-hatch-requirements-txt-0.4.0" "python3.11-hatch-fancy-pypi-readme-23.1.0" "python3.11-hatchling-1.18.0" "python3.11-setuptools-68.2.2" ]
| 20:58:37 |