!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

303 Members
https://github.com/nix-community/poetry2nix55 Servers

Load older messages


SenderMessageTime
19 Jan 2022
@k900:0upti.meK900You can probably add a newer version to buildInputs17:14:40
@zupo:matrix.orgzupo joined the room.21:14:15
@zupo:matrix.orgzupogheesh hunting this bug down almost killed me: https://github.com/nix-community/poetry2nix/issues/52321:14:31
@zupo:matrix.orgzupobut I stand victorious! ⚔️ 🐛21:15:19
@adis:blad.isadisbladis
In reply to @zupo:matrix.org
gheesh hunting this bug down almost killed me: https://github.com/nix-community/poetry2nix/issues/523

I don't think this is a bug in poetry2nix, but an unfortunate side effect of how nixpkgs python infra propagates it's dependencies.

What does which python say?

22:18:21
@zupo:matrix.orgzupo[nix-shell:~/work/big-sur-poetry-test]$ which python /nix/store/avn3nqyfphpaakj2xijazsfry0g93f10-python3-3.9.6/bin/python23:24:59
@zupo:matrix.orgzupoRedacted or Malformed Event23:26:44
@zupo:matrix.orgzupo adisbladis: Ah I see, yes, makes sense that it's leaky docker-compose in nixpkgs. Should I move the bug report there? 23:29:52
@adis:blad.isadisbladis
In reply to @zupo:matrix.org
adisbladis: Ah I see, yes, makes sense that it's leaky docker-compose in nixpkgs. Should I move the bug report there?

I think so.
A quick fixup on your end could be to override docker-compose something along these lines:

docker-compose.overridePythonAttrs(old: {
  postFixup = ''
    rm $out/nix-support/propagated-build-inputs
  '';
})
23:38:26
@adis:blad.isadisbladisThis is a pretty pervasive problem in nixpkgs23:39:27
@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

Show newer messages


Back to Room ListRoom Version: 6