26 May 2022 |
adisbladis | Add it upstream in https://github.com/nix-community/poetry2nix/pull/649 | 17:14:35 |
| madhadder joined the room. | 17:58:46 |
| notgne2 joined the room. | 22:19:08 |
3 Jun 2022 |
| gmacon joined the room. | 19:58:51 |
4 Jun 2022 |
| schuelermine joined the room. | 12:31:16 |
schuelermine | Hi! I’ve never used Poetry before but I want to package a project that uses it. Can I use the Poetry2Nix functions directly inside Nixpkgs? I noticed that poetry build generates a dist directory and the tarball inside contains a setup.py . Should I specify the Poetry2Nix call as src ? I’m unsure how this is supposed to work. | 12:33:29 |
adisbladis | In reply to @schuelermine:matrix.org Hi! I’ve never used Poetry before but I want to package a project that uses it. Can I use the Poetry2Nix functions directly inside Nixpkgs? I noticed that poetry build generates a dist directory and the tarball inside contains a setup.py . Should I specify the Poetry2Nix call as src ? I’m unsure how this is supposed to work. You don't use the build directory from poetry build for packaging. | 13:23:04 |
adisbladis | That directory is used for publishing on pypi | 13:23:20 |
adisbladis | You should just point poetry2nix to the sources | 13:23:31 |
adisbladis | The setup.py is a compatibility thing | 13:23:45 |
schuelermine | Oh OK | 13:26:16 |
schuelermine | Thanks | 13:26:27 |
adisbladis | Internally poetry still generates the setup.py at build time iirc | 13:26:48 |
adisbladis | But that's not something you need to bother with, it's an implementation detail | 13:26:59 |
schuelermine | But is it correct to put fetchFromGitHub or similar in projectDir? | 13:35:37 |
schuelermine | And is the result from the call to mkPoetryApplication a derivation that can be put into nixpkgs? | 13:35:54 |
adisbladis | You can do that, but that would result in IFD | 13:36:00 |
adisbladis | Which isn't allowed in nixpkgs | 13:36:08 |
schuelermine | Oh | 13:36:14 |
adisbladis | In nixpkgs you'd have to copy pyproject.toml & poetry.lock | 13:36:24 |
schuelermine | OK | 13:36:33 |
5 Jun 2022 |
rht | 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 |
rht | 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 |
m1cr0man | 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 |
m1cr0man | Ah... I was missing a .env at the end. I thought that was implied in mkPoetryEnv, whoops | 21:45:41 |
7 Jun 2022 |
adisbladis | In reply to @m1cr0man:m1cr0man.com Ah... I was missing a .env at the end. I thought that was implied in mkPoetryEnv, whoops It's a bit unfortunate, it's a detail that's inherited from pythonX.withPackages . | 11:12:14 |
m1cr0man | In reply to @adis:blad.is It's a bit unfortunate, it's a detail that's inherited from pythonX.withPackages . 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 |
adisbladis | In reply to @m1cr0man:m1cr0man.com
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 Cool! | 11:14:56 |
8 Jun 2022 |
Jeff | In reply to @m1cr0man:m1cr0man.com
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 Any tips on how to do that? I've been trying to figure out the best way to integrate vscode/poetry/nix | 15:18:20 |
m1cr0man | In reply to @jeff:ocjtech.us Any tips on how to do that? I've been trying to figure out the best way to integrate vscode/poetry/nix Oh sure! Lemme commit this repo so you can see | 18:27:04 |