!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
9 Jun 2022
@edrex:matrix.orgedrex So I'm adding the libs pywlroots needs to build to my devshell's buildInputs, which seems to work 01:57:48
@edrex:matrix.orgedrexSeems awkward though. Is there something I'm missing?01:58:03
@edrex:matrix.orgedrexI'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
@robert:funklause.dedotlambda joined the room.02:07:30
@edrex:matrix.orgedrexOr at least the issue should be documented.02:13:50
@edrex:matrix.orgedrex 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
@edrex:matrix.orgedrexhttps://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
@edrex:matrix.orgedrex

Answering my own question:
poetry add has a --lock flag:

Do not perform operations (only update the lockfile).

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
@edrex:matrix.orgedrex *

Answering my own question:
poetry add has a --lock flag:

Do not perform operations (only update the lockfile).

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
@edrex:matrix.orgedrex I don't really get what preferWheels does. It just tries to get prebuilt packages over building from source? 06:17:09
@edrex:matrix.orgedrex

reading the source of mkPoetryApplicaiton, it seems like it's supposed to produce a runnable, but I get an error

error: attribute 'apps.x86_64-linux.default' should have type 'app'

(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 __init__.py at the project root.

06:45:03
@adis:blad.isadisbladis
In reply to @edrex:matrix.org
I don't really get what preferWheels does. It just tries to get prebuilt packages over building from source?
Yes, exactly. It changes the preference order.
19:53:20
12 Jun 2022
@jamie-howlie:monero.socialjamie-howlieHi all, im trying to use poetry2nix, but I cant get it to work with our internal pypi server.10:54:32
@jamie-howlie:monero.socialjamie-howlieI do have a poetry.lock that points to it10:54:46
@jamie-howlie:monero.socialjamie-howlieAny idea on how to get that working?10:54:57
13 Jun 2022
@linus:schreibt.jetztLinux Hackerman joined the room.14:51:07
@linus:schreibt.jetztLinux HackermanIs there an elegant way to run package tests in a derivation when using poetry2nix?14:58:31
@adis:blad.isadisbladis
In reply to @linus:schreibt.jetzt
Is there an elegant way to run package tests in a derivation when using poetry2nix?
You could just run it in the check phase?
17:13:59
14 Jun 2022
@linus:schreibt.jetztLinux Hackermanoh right, yeah that works since I'm using mkPoetryApplication10:15:13
@linus:schreibt.jetztLinux Hackermanit's a bit confusing since not all the mkPoetry* support all the options that they could AFAIU10:15:31
@linus:schreibt.jetztLinux Hackermanhm, why does setting nativeBuildInputs for a package in an override prevent it from using the python builder?10:19:08
15 Jun 2022
@vengmark2:matrix.orgl0b0 Hi all, I'm running into a problem where nix-shell --pure --run ansible-lint fails with "ImportError: cannot import name 'main' from 'ansible.cli.config'" after changing from nixpkgs 21.11-2022-03-08 (https://github.com/NixOS/nixpkgs/archive/bb3dee861440695ce6d8f43d0dd3a97622cb08c4.tar.gz) to 22.05 (https://github.com/NixOS/nixpkgs/archive/ce6aa13369b667ac2542593170993504932eb836.tar.gz). 04:17:26
@robert:funklause.dedotlambda
In reply to @vengmark2:matrix.org
Hi all, I'm running into a problem where nix-shell --pure --run ansible-lint fails with "ImportError: cannot import name 'main' from 'ansible.cli.config'" after changing from nixpkgs 21.11-2022-03-08 (https://github.com/NixOS/nixpkgs/archive/bb3dee861440695ce6d8f43d0dd3a97622cb08c4.tar.gz) to 22.05 (https://github.com/NixOS/nixpkgs/archive/ce6aa13369b667ac2542593170993504932eb836.tar.gz).
nix-shell --pure -p ansible-lint --run ansible-lint works
04:25:27
@vengmark2:matrix.orgl0b0 dotlambda: I'm installing ansible-lint through poetry2nix though. 04:52:54
@vengmark2:matrix.orgl0b0(So that non-Nix users can use the repo.)04:53:16
@vengmark2:matrix.orgl0b0Scratch that. Turns out in this repo ansible-lint is installed with Nix and ansible itself is installed with Poetry. I'll fix that. Sorry for the noise.21:07:07
@vengmark2:matrix.orgl0b0 * Scratch that. Turns out in this repo pkgs.ansible-lint is installed with Nix and ansible itself is installed with Poetry. I'll fix that. Sorry for the noise. 21:08:34
18 Jun 2022
@atharvaamritkar:matrix.orgwiredhikari joined the room.10:03:40
20 Jun 2022
@dylanrjohnston-fz:matrix.orgdylanrjohnston-fz joined the room.07:10:36
21 Jun 2022
@b42:matrix.orgb42 joined the room.11:57:00

Show newer messages


Back to Room ListRoom Version: 6