!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

296 Members
https://github.com/nix-community/poetry2nix63 Servers

Load older messages


SenderMessageTime
26 May 2022
@adis:blad.isadisbladisAdd it upstream in https://github.com/nix-community/poetry2nix/pull/64917:14:35
@madhadder:matrix.orgmadhadder joined the room.17:58:46
@notgne2:wizbos.clubnotgne2 joined the room.22:19:08
3 Jun 2022
@gmacon:matrix.orggmacon joined the room.19:58:51
4 Jun 2022
@schuelermine:matrix.orgschuelermine joined the room.12:31:16
@schuelermine:matrix.orgschuelermine 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
@adis:blad.isadisbladis
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
@adis:blad.isadisbladisThat directory is used for publishing on pypi13:23:20
@adis:blad.isadisbladisYou should just point poetry2nix to the sources13:23:31
@adis:blad.isadisbladisThe setup.py is a compatibility thing13:23:45
@schuelermine:matrix.orgschuelermineOh OK13:26:16
@schuelermine:matrix.orgschuelermineThanks13:26:27
@adis:blad.isadisbladisInternally poetry still generates the setup.py at build time iirc13:26:48
@adis:blad.isadisbladisBut that's not something you need to bother with, it's an implementation detail13:26:59
@schuelermine:matrix.orgschuelermineBut is it correct to put fetchFromGitHub or similar in projectDir?13:35:37
@schuelermine:matrix.orgschuelermineAnd is the result from the call to mkPoetryApplication a derivation that can be put into nixpkgs?13:35:54
@adis:blad.isadisbladisYou can do that, but that would result in IFD13:36:00
@adis:blad.isadisbladisWhich isn't allowed in nixpkgs13:36:08
@schuelermine:matrix.orgschuelermineOh13:36:14
@adis:blad.isadisbladisIn nixpkgs you'd have to copy pyproject.toml & poetry.lock13:36:24
@schuelermine:matrix.orgschuelermineOK13:36:33
5 Jun 2022
@landau:matrix.orgrhtwith 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
@landau:matrix.orgrhtthe 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/62707:58:10
6 Jun 2022
@m1cr0man:m1cr0man.comm1cr0manHey 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? TIA21:16:53
@m1cr0man:m1cr0man.comm1cr0man Ah... I was missing a .env at the end. I thought that was implied in mkPoetryEnv, whoops 21:45:41
7 Jun 2022
@adis:blad.isadisbladis
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:m1cr0man.comm1cr0man
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
@adis:blad.isadisbladis
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:ocjtech.usJeff
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:m1cr0man.comm1cr0man
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

There are no newer messages yet.


Back to Room ListRoom Version: 6