Poetry2nix | 332 Members | |
| https://github.com/nix-community/poetry2nix | 63 Servers |
| Sender | Message | Time |
|---|---|---|
| 4 Jun 2022 | ||
| In nixpkgs you'd have to copy pyproject.toml & poetry.lock | 13:36:24 | |
| OK | 13:36:33 | |
| 5 Jun 2022 | ||
| with the context of https://discourse.nixos.org/t/mach-nix-pip2nix-poetry2nix-or-pynixify-for-zulip-provision/18836/19, one of the 2 blockers for zulip to use poetry2nix is https://github.com/nix-community/poetry2nix/issues/627. but given that the relevant poetry feature is still not yet released (1.2.0a2), i don't see that zulip on nix will happen soon :/ | 07:57:09 | |
| the other blocker is https://github.com/python-poetry/poetry/issues/5462, but it's not as severe as https://github.com/nix-community/poetry2nix/issues/627 | 07:58:10 | |
| 6 Jun 2022 | ||
| Hey folks. I'm struggling to understand why my dev dependencies aren't available in this shell: https://github.com/m1cr0man/python-nixos-nspawn/blob/commands/flake.nix#L54-L56 (for example, flake8 and black). Any suggestions? TIA | 21:16:53 | |
Ah... I was missing a .env at the end. I thought that was implied in mkPoetryEnv, whoops | 21:45:41 | |
| 7 Jun 2022 | ||
In reply to @m1cr0man:m1cr0man.comIt's a bit unfortunate, it's a detail that's inherited from pythonX.withPackages. | 11:12:14 | |
In reply to @adis:blad.is I do prefer the consistency between them. I actually use py.withPackages on the next line :P Also a nice discovery I made is that I could use the result of mkPoetryEnv as a python venv in VS Code without nix environment selector :) I thought the nix output wouldn't be compatible but it is | 11:14:24 | |
In reply to @m1cr0man:m1cr0man.comCool! | 11:14:56 | |
| 8 Jun 2022 | ||
In reply to @m1cr0man:m1cr0man.comAny tips on how to do that? I've been trying to figure out the best way to integrate vscode/poetry/nix | 15:18:20 | |
In reply to @jeff:ocjtech.usOh sure! Lemme commit this repo so you can see | 18:27:04 | |
| https://github.com/m1cr0man/python-nixos-nspawn/tree/commands so you can see in my Readme that for a new clone, you just run a nix build + open vscode and it should all just work ™️. However, I just spent the last hour trying to figure out why my "trick" for adding poetry in with mkPoetryEnv wasn't working and I couldn't figure it out :/ for now I just have another devShell option for poetry exclusively, which is annoying | 19:18:07 | |
^ You know what, this totally doesn't work XD I still need to nix develop in my shell so that python libraries are resolvable. Setting PATH ain't enough. Also poetry isn't happy with the .venv and keeps creating a cache copy. 🤷 | 21:32:46 | |
| 9 Jun 2022 | ||
| poetry2nix on macos will currently use wheels built for 10.12 and 11.0, but not 10.13, 10.14, or 10.15, but I don't see an obvious reason why this gap exists. Is there a reason, or could we fill in the gap? (for reference: https://github.com/nix-community/poetry2nix/blob/73fc21abbed96024f6533da259d5b01b1337ae4d/pep425.nix#L102) | 00:26:55 | |
| 01:51:15 | ||
| * | 01:52:16 | |
| I'm trying poetry2nix for a wayland client script | 01:52:43 | |
| I have need to depend on a package that has some FFI lib deps (pywlroots) | 01:54:10 | |
I understand overrides override the contents of poetry.lock for nix _ commands, but to populate the lock initially, poetry add _ must be used, and this requires the python package's builddeps to be present in the env, as far as I understand it | 01:56:38 | |
So I'm adding the libs pywlroots needs to build to my devshell's buildInputs, which seems to work | 01:57:48 | |
| Seems awkward though. Is there something I'm missing? | 01:58:03 | |
| I'm just wondering if there's a way to populate the lock file without manually adding all the build deps for the package you want to override to the env. Seems like something poetry2nix should handle. | 02:04:14 | |
| 02:07:30 | ||
| Or at least the issue should be documented. | 02:13:50 | |
how can I get a "Runnable" out of poetry2nix? Something I use as the value of my flake's outputs.apps.default so nix run works? | 02:42:57 | |
| https://github.com/nix-community/poetry2nix/blob/master/templates/app/flake.nix#L28 uses poetryApplication, but that just results in a shell, not running your application script. | 02:48:44 | |
| Answering my own question:
This is ideal for installing packages that require an override to build in the current env. Looking at the poetry2nix README, I'm not sure where that could be added, but it's definitely valuable | 05:54:44 | |
| * Answering my own question:
This is ideal for ~~installing~~ adding packages that require an override to build in the current env. Looking at the poetry2nix README, I'm not sure where that could be added, but it's definitely valuable | 05:55:19 | |
I don't really get what preferWheels does. It just tries to get prebuilt packages over building from source? | 06:17:09 | |
| reading the source of mkPoetryApplicaiton, it seems like it's supposed to produce a runnable, but I get an error
(nix 2.8) Anybody know what's up with this? How should I have my project structured for this to work? I have a runnable | 06:45:03 | |