!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

317 Members
https://github.com/nix-community/poetry2nix61 Servers

Load older messages


SenderMessageTime
19 Jan 2022
@adis:blad.isadisbladis And I think that the correct solution would be to change buildPythonApplication to not propagate python deps 23:39:57
@adis:blad.isadisbladis zupo: I do the same thing for the Poetry derivation: https://github.com/nix-community/poetry2nix/blob/master/pkgs/poetry/default.nix#L41-L45 23:40:54
20 Jan 2022
@zupo:matrix.orgzupo👍👍 thanks07:24:29
@cchalc:matrix.orgcchalc joined the room.08:41:34
@sephi:matrix.orgsephi joined the room.09:35:41
@martert:matrix.orgMartin Ertsås joined the room.14:36:36
@martert:matrix.orgMartin Ertsås

Hi. I'm struggling in making a development shell for my project. It fails when trying to fetch pytest. I have made a minimal example: https://github.com/martiert/poetry2nix-pytest-error

Not sure if this is a bug, or I'm doing something wrong? My ideal result of this is me being able to run python -m pytest in the shell and have it run my tests

14:42:00
@mou_bugtracker:matrix.orgmou

Just tried to build your flake and got this error

       last 10 log lines:
       > Sourcing pip-install-hook
       > Using pipInstallPhase
       > Sourcing python-imports-check-hook.sh
       > Using pythonImportsCheckPhase
       > Sourcing python-namespaces-hook
       > unpacking sources
       > Executing wheelUnpackPhase
       > Finished executing wheelUnpackPhase
       > patching sources
       > sed: can't read setup.cfg: No such file or directory

Just to save some time for whom who will look into issue

14:45:59
@mou_bugtracker:matrix.orgmou *

Just tried to build your flake and got this error

       last 10 log lines:
       > Sourcing pip-install-hook
       > Using pipInstallPhase
       > Sourcing python-imports-check-hook.sh
       > Using pythonImportsCheckPhase
       > Sourcing python-namespaces-hook
       > unpacking sources
       > Executing wheelUnpackPhase
       > Finished executing wheelUnpackPhase
       > patching sources
       > sed: can't read setup.cfg: No such file or directory

Just to save some time for whom who will look into the issue

14:46:59
@martert:matrix.orgMartin Ertsåsaaah, yeah. I forgot to add that. Thank you.14:47:25
@martert:matrix.orgMartin Ertsåsand that's when trying to build the pytest wheel.14:47:44
@mou_bugtracker:matrix.orgmou My bet: issue lies inside nixpkgs buildPythonPackage, but it's only guess 14:53:18
@martert:matrix.orgMartin Ertsås you're probably right. but I'm completely out of my depths on what I can do to fix it. When making the application I had a package with the same issue, but adding doCheck = false in my mkPoetryApplication helped with that. Which is not a flag for the environment 15:00:23
@mou_bugtracker:matrix.orgmou I did not this by myself, but is it possible to create overlay over nixpkgs, in which you set doCheck = false for whatever package you want? 15:30:05
@martert:matrix.orgMartin Ertsåsthat's a good point, I'll have a look at doing that15:32:57
@mou_bugtracker:matrix.orgmou * I did not do it by myself, but is it possible to create overlay over nixpkgs, in which you set doCheck = false for whatever package you want? 15:32:57
@martert:matrix.orgMartin Ertsåsthank you15:33:21
@mou_bugtracker:matrix.orgmouI saw a lot of snippets with overridePythonAttrs in this chat, maybe you could search in history for inspiration15:35:16
@mou_bugtracker:matrix.orgmou * I did not do it by myself, but it is possible to create overlay over nixpkgs, in which you set doCheck = false for whatever package you want? 15:36:45
@tcelferact:matrix.orgtcelferactRedacted or Malformed Event17:17:31
@tcelferact:matrix.orgtcelferact

Hi folks, I'm struggling to define an override that will get msgpack to build on an M1 mac. It looks like poetry2nix builds a wheel that it can't then run:

  Created wheel for msgpack: filename=msgpack-1.0.2-cp37-cp37m-macosx_11_0_arm64.whl size=67561 sha256=141d4aff3d7453e3411c0ffb7daeaf68bececd4aff7054d41a616a07a9ba7036
  Stored in directory: /private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/pip-ephem-wheel-cache-i7nzg6nu/wheels/04/ab/f5/eee33f4ffc30671d9708fc39bd5968a5c1c35e3867f17ff387
Successfully built msgpack
Removed build tracker: '/private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/pip-req-tracker-ghv1i0v0'
Finished creating a wheel...
Finished executing pipBuildPhase
installing
Executing pipInstallPhase
/private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/msgpack-1.0.2/dist /private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/msgpack-1.0.2
ERROR: msgpack-1.0.2-cp37-cp37m-macosx_11_0_arm64.whl is not a supported wheel on this platform.
builder for '/nix/store/f2zf6z5k2120z7f8h7qcjvi34bz4iy4w-python3.7-msgpack-1.0.2.drv' failed with exit code 1

I'm way off understanding how to fix this, although I have tried an addPoetry style override which didn't work:

    msgpack = super.msgpack.overridePythonAttrs (
      old: {
        nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.poetry-core ];
      }
    );

Can anyone offer advice? Thanks!

For future folks with this problem, updating to the 21.11 channel removed the error.

17:18:11
@k900:0upti.meK900Use a newer Python17:22:12
@k900:0upti.meK900Python 3.7's pip does not understand OSX on M117:22:20
21 Jan 2022
@adis:blad.isadisbladisI did something somewhat heroic if I may say so myself: https://github.com/nix-community/poetry2nix/pull/52502:05:32
@adis:blad.isadisbladisAnd a "small" follow-up https://github.com/nix-community/poetry2nix/pull/52602:52:54
@adis:blad.isadisbladis K900: Those should resolve a lot of pain with manually creating overrides 04:25:57
@k900:0upti.meK900
In reply to @adis:blad.is
K900: Those should resolve a lot of pain with manually creating overrides
This actually broke aiosqlite for me :(
06:59:22
@k900:0upti.meK900Looks like the script detects it as depending on poetry07:00:53
@k900:0upti.meK900But it actually uses flit07:00:57
@mou_bugtracker:matrix.orgmouDoes anybody use Pycharm in conjunction with nix, flakes and poetry2nix? I know there are a million and one way to create environment, but i will very grateful for any snippet. 07:50:45

Show newer messages


Back to Room ListRoom Version: 6