| 8 Nov 2023 |
@ryoschin:matrix.org | nix flake init --template github:nix-community/poetry2nix
All I did was modify this one by adding some packages. Is it not supposed to work by default, or?
| 15:04:59 |
@ryoschin:matrix.org | In reply to @petrichor:envs.net confusingly, the corresponding nixs flakes command to nix-shell is nix develop Right, and will direnv not do that by default? | 15:05:35 |
K900 | https://github.com/nix-community/poetry2nix/pull/1407 | 15:05:48 |
K900 | Basically add this | 15:05:50 |
@petrichor:envs.net | should do, if your .envrc includes use flake | 15:07:18 |
@ryoschin:matrix.org | [tool.poetry.dependencies]
python = "^3.11"
discord = "^2.3.2"
This is the part where I specify the dependencies. And, while building with direnv, this popped out:
> ModuleNotFoundError: No module named 'setuptools'
| 15:41:44 |
@ryoschin:matrix.org | Aside from that, after the change you made, it seems like direnv (or p2nix) did start automatically downloading the depencencies | 15:42:47 |
K900 | See https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md | 15:43:54 |
@ryoschin:matrix.org | error: attribute 'defaultPoetryOverrides' missing - Is this supposed to happen? | 15:54:05 |
@ryoschin:matrix.org | * error: attribute 'defaultPoetryOverrides' missing - Is this supposed to happen.. | 15:55:51 |
K900 | In reply to @k900:0upti.me You should update the line ^ | 15:57:59 |
K900 | Read from that message down | 15:58:05 |
@ryoschin:matrix.org | Alright, it's working. Thank you! | 16:22:23 |
matthewcroughan | How do you build a specific "group" with poetry2nix functions? | 18:02:28 |
matthewcroughan | ah groups list of strings | 18:03:16 |
matthewcroughan | I cannot stop a package from downloading the wheel, any pointers? | 20:09:33 |
matthewcroughan | triton = (super.triton.override { preferWheel = false; }).overridePythonAttrs
(
old: {
prePatch = ''
find ./ -name 'CMakeLists'
ls -lah $src
ls -lah $src
ls -lah $src
ls -lah $src
ls -lah $src
ls -lah $src
ls -lah $src
ls -lah $src
ls -lah $src
'';
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.cmake ];
}
);
| 20:09:52 |
matthewcroughan | * triton = (super.triton.override { preferWheel = false; }).overridePythonAttrs
(
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.cmake ];
}
);
| 20:10:02 |
matthewcroughan | * triton = (super.triton.override { preferWheel = false; }).overridePythonAttrs
(
old: {
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.cmake ];
}
);
| 20:10:06 |
matthewcroughan | even though I've set preferWheel = false | 20:10:19 |
matthewcroughan | even when it gets the wheel, it keeps saying it needs cmake | 20:10:35 |
@fractivore:cyberia.club | Just an update, since I got a lot of help with a poetry2nix build the other day - that project turned out to be very nix unfriendly. After initial installation, it checked for some other third party tools and then tried installing them via pip. This failed of course from my binary built with poetry2nix. I decided to stop pursuing packing it due to its rather fundamentally unfriendly design towards nix. | 20:27:25 |
@fractivore:cyberia.club | It's basically a bundle of other projects, so it would make more sense to just pack the constituents individually and pull them together into a fully declarative configuration. | 21:09:29 |
@fractivore:cyberia.club | No matter, it was a good opportunity to learn about poetry2nix. | 21:11:59 |
adisbladis | In reply to @matthewcroughan:defenestrate.it even when it gets the wheel, it keeps saying it needs cmake Maybe the wheel is linking against it? | 21:15:41 |
matthewcroughan | adisbladis: ``` python3.11-triton> /nix/store/nid28g9ivpg8lvc6wk8na8mzxzyhqw8m-python3.11-cmake-3.26.4/nix-support/setup-hook: line 126: cmake: command not found
| 22:04:52 |
matthewcroughan | * adisbladis:
python3.11-triton> /nix/store/nid28g9ivpg8lvc6wk8na8mzxzyhqw8m-python3.11-cmake-3.26.4/nix-support/setup-hook: line 126: cmake: command not found
| 22:04:58 |
matthewcroughan | but it's just a dist/*.whl | 22:05:05 |
adisbladis | Oh right | 22:05:12 |
adisbladis | Can you provide some more context? | 22:05:38 |