!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
7 Nov 2023
@adis:blad.isadisbladisFar from complete but taking a bit of a shape: https://github.com/adisbladis/pdm2nix https://adisbladis.github.io/pdm2nix/03:42:45
@softinio:matrix.org@softinio:matrix.org changed their profile picture.17:56:37
@fractivore:cyberia.club@fractivore:cyberia.club joined the room.19:14:30
@fractivore:cyberia.club@fractivore:cyberia.clubHello, so I'm trying to build this project: https://github.com/blacklanternsecurity/bbot using poetry2nix19:16:18
@fractivore:cyberia.club@fractivore:cyberia.club I tried using the flake with nix flake init --template github:nix-community/poetry2nix 19:17:11
@fractivore:cyberia.club@fractivore:cyberia.club Then, nix build 19:17:19
@fractivore:cyberia.club@fractivore:cyberia.club

My memory usage spiked and I had to SIGINT the process. I closed all my open applications and tried running nix build again, and now I'm getting:

error: builder for '/nix/store/pnl61k9cn2g7n3cfwysxcb36bqvq5d8i-python3.11-wordninja-2.0.0.drv' failed with exit code 2;
       last 10 log lines:
       >   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
       >   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
       >   File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
       >   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
       >   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
       >   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
       >   File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
       > ModuleNotFoundError: No module named 'setuptools'

19:19:07
@k900:0upti.meK900That's normal19:19:51
@k900:0upti.meK900Well, not really normal but19:19:54
@k900:0upti.meK900https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md19:20:02
@fractivore:cyberia.club@fractivore:cyberia.clubohhh alright, excellent19:21:49
@fractivore:cyberia.club@fractivore:cyberia.club

okay, so I tried modifying the flake.nix that was previously generated, to include:

        packages = {
          myapp = mkPoetryApplication { projectDir = self;
            overrides = poetry2nix.defaultPoetryOverrides.extend
            (self: super: {
              wordninja = super.wordninja.overridePythonAttrs
              (
                old: {
                  buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
                }
              );
            });
          };
          default = self.packages.${system}.myapp;
        };
19:30:20
@fractivore:cyberia.club@fractivore:cyberia.club I got:
error: attribute 'defaultPoetryOverrides' missing
19:31:16
@k900:0upti.meK900The flake template is slightly wrong19:32:10
@k900:0upti.meK900I think19:32:11
@k900:0upti.meK900Actually no it's not19:32:35
@k900:0upti.meK900You should update the line19:32:38
@k900:0upti.meK900 inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication; to inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication defaultPoetryOverrides; 19:32:47
@k900:0upti.meK900 And then use defaultPoetryOverrides instead of poetry2nix.defaultPoetryOverrides 19:32:57
@fractivore:cyberia.club@fractivore:cyberia.club hmm, okay, I tried that, and now I'm getting:
> ModuleNotFoundError: No module named 'poetry'
I know that's the same form as before and it said to work through them one after the other, but is that really right? This is poetry2nix after all
19:37:20
@k900:0upti.meK900Yes19:37:29
@k900:0upti.meK900It's one of your dependencies19:37:35
@k900:0upti.meK900Not your primary project19:37:39
@k900:0upti.meK900And we don't inject poetry into things unconditionally19:37:48
@fractivore:cyberia.club@fractivore:cyberia.clubhmm, okay, I guess that makes sense19:38:15
@fractivore:cyberia.club@fractivore:cyberia.clubI'm working through them one by one. One other question, what does the "git tree is dirty" warning mean?19:46:49
@froxictog:matrix.orgToxicFrogYou have changes that haven't been committed to git, and it's using the changed versions of the files20:02:54
@froxictog:matrix.orgToxicFrogBasically "don't forget to commit your changes once you get this working"20:03:07
@fractivore:cyberia.club@fractivore:cyberia.clubahh, ok, thanks20:07:06
@fractivore:cyberia.club@fractivore:cyberia.club

I worked through several of those overrides, but now I'm getting this error:

error: builder for '/nix/store/pkifnw3bdlg37rv5ss184m2xvdlp6jb8-python3.11-bbot-1.0.3.drv' failed with exit code 1;
       last 10 log lines:
       >     patch.activate()
       >   File "/nix/store/n9ix258chw1nm40bk8lr2kp4jw8lllhk-python3.11-poetry-dynamic-versioning-0.21.5/lib/python3.11/site-packages/poetry_dynamic_versi
oning/patch.py", line 52, in activate
       >     _apply_patches()
       >   File "/nix/store/n9ix258chw1nm40bk8lr2kp4jw8lllhk-python3.11-poetry-dynamic-versioning-0.21.5/lib/python3.11/site-packages/poetry_dynamic_versi
oning/patch.py", line 43, in _apply_patches
       >     _patch_poetry_create(factory_mod)
       >   File "/nix/store/n9ix258chw1nm40bk8lr2kp4jw8lllhk-python3.11-poetry-dynamic-versioning-0.21.5/lib/python3.11/site-packages/poetry_dynamic_versi
oning/patch.py", line 14, in _patch_poetry_create
       >     from poetry.core.semver.version import Version as PoetryVersion
       > ModuleNotFoundError: No module named 'poetry.core.semver'
       >
       > ERROR Backend 'poetry_dynamic_versioning.backend' is not available.

20:26:36

Show newer messages


Back to Room ListRoom Version: 6