!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

319 Members
https://github.com/nix-community/poetry2nix60 Servers

Load older messages


SenderMessageTime
22 Feb 2022
@mou_bugtracker:matrix.orgmou
In reply to @x10an14:matrix.org
Anyone here got a tip for me how to overcome this build error? https://paste.sr.ht/~x10an14/9ad4459b175e516d04bc3fb17123c3206da6a3c0#nix%20build%20log%20error-L94 It's my first time using poetry2nix, so I may have messed up my flake.nix...

Try to define mkPoetryApplication with override like this

    defaultPythonSetup = {
      projectDir = ./.;
      overrides = prev.poetry2nix.defaultPoetryOverrides.extend ( self: super: {
              prospector = super.uengine.overridePythonAttrs (
                old: {
                  buildInputs = (old.buildInputs or [ ]) ++ [ self.poetry ];
                }
              );
            });
          };

Sorry for formatting

16:43:45
@mou_bugtracker:matrix.orgmouIt's my guess based on error log. I assume, prospector package using poetry for building, but poetry2nix have no information about this fact, so there is possibly missing build dependency16:45:59
@mou_bugtracker:matrix.orgmousorry, i messed up.16:46:29
@x10an14:matrix.orgx10an14
In reply to @mou_bugtracker:matrix.org

Try to define mkPoetryApplication with override like this

    defaultPythonSetup = {
      projectDir = ./.;
      overrides = prev.poetry2nix.defaultPoetryOverrides.extend ( self: super: {
              prospector = super.uengine.overridePythonAttrs (
                old: {
                  buildInputs = (old.buildInputs or [ ]) ++ [ self.poetry ];
                }
              );
            });
          };

Sorry for formatting

Thanks! Can't get that to work though, seems like it won't merge properly? As-is, it complains about the prev on your line 3, since defaultPythonSetup is just an attrset to make things DRY, not an overlay/function.
16:46:35
@mou_bugtracker:matrix.orgmou

here how i define such override (whole example)

      overlay = nixpkgs.lib.composeManyExtensions [ poetry2nix.overlay
        (final: prev: {
          # The application
          myapp = prev.poetry2nix.mkPoetryApplication {
            projectDir = ./.;
            python = prev.python38;
            overrides = prev.poetry2nix.defaultPoetryOverrides.extend ( self: super: {
              brokenPackage = super.brokenPackage.overridePythonAttrs (
                old: {
                  buildInputs = (old.buildInputs or [ ]) ++ [ self.poetry ];
                }
              );
            });
          };
        })
      ];

This is overlay for nixpkgs as it appears in poetry2nix README example

16:48:51
@mou_bugtracker:matrix.orgmouThis is where prev comes from. It refers to pre-override nixpkgs16:49:28
@mou_bugtracker:matrix.orgmou * This is where prev comes from. It refers to pre-overlay nixpkgs16:49:38
@x10an14:matrix.orgx10an14Ahh, gotcha. Thanks! =D16:49:45
@mou_bugtracker:matrix.orgmoui should be more accurate next time. hope my guess is lucky )16:50:52
@x10an14:matrix.orgx10an14
In reply to @mou_bugtracker:matrix.org
i should be more accurate next time. hope my guess is lucky )

Does this git diff look correct to you? I get the same error as previously with it =/ I must admit I'm not really understanding what I'm doing^^

diff --git a/flake.nix b/flake.nix
index 33fa1be..f5bef00 100644
--- a/flake.nix
+++ b/flake.nix
@@ -23,7 +23,19 @@
       poetry2nix.overlay (
         final: prev: {
           # The application
-          app = prev.poetry2nix.mkPoetryApplication defaultPythonSetup;
+          app = prev.poetry2nix.mkPoetryApplication (
+            {
+              overrides = prev.poetry2nix.defaultPoetryOverrides.extend (
+                self: super: {
+                  brokenPackage = super.brokenPackage.overridePythonAttrs (
+                    old: {
+                      buildInputs = (old.buildInputs or [ ]) ++ [self.poetry];
+                    }
+                  );
+                }
+              );
+            } // defaultPythonSetup
+          );
         }
       )
     ];
16:53:04
@mou_bugtracker:matrix.orgmou
In reply to @x10an14:matrix.org

Does this git diff look correct to you? I get the same error as previously with it =/ I must admit I'm not really understanding what I'm doing^^

diff --git a/flake.nix b/flake.nix
index 33fa1be..f5bef00 100644
--- a/flake.nix
+++ b/flake.nix
@@ -23,7 +23,19 @@
       poetry2nix.overlay (
         final: prev: {
           # The application
-          app = prev.poetry2nix.mkPoetryApplication defaultPythonSetup;
+          app = prev.poetry2nix.mkPoetryApplication (
+            {
+              overrides = prev.poetry2nix.defaultPoetryOverrides.extend (
+                self: super: {
+                  brokenPackage = super.brokenPackage.overridePythonAttrs (
+                    old: {
+                      buildInputs = (old.buildInputs or [ ]) ++ [self.poetry];
+                    }
+                  );
+                }
+              );
+            } // defaultPythonSetup
+          );
         }
       )
     ];
replace brokenPackage with prospector (this is the package which cause troubles, i guess)
16:54:34
@x10an14:matrix.orgx10an14
In reply to @mou_bugtracker:matrix.org
replace brokenPackage with prospector (this is the package which cause troubles, i guess)
Ahh, gotcha, I see the logic then. Thanks!
16:54:58
@mou_bugtracker:matrix.orgmouaccording to log, error occurs during building prospector, and errors states, what pip could not find poetry-core. So we create override to provide poetry-core to buildInputs of prospector16:56:09
@x10an14:matrix.orgx10an14 That fixed my issue with prospector, thanks mou! =D Now I gotta figure out how to fix the next error... 16:56:20
@x10an14:matrix.orgx10an14
In reply to @x10an14:matrix.org
That fixed my issue with prospector, thanks mou! =D Now I gotta figure out how to fix the next error...
https://paste.sr.ht/~x10an14/8b83382fa0c3a0352ed79f9757b7ae7ff7249263 <-- A python egg a different dependency tries to create. I'ma be busy searching the poetry2nix repo's issues =P
16:57:40
@mou_bugtracker:matrix.orgmou
In reply to @x10an14:matrix.org
https://paste.sr.ht/~x10an14/8b83382fa0c3a0352ed79f9757b7ae7ff7249263 <-- A python egg a different dependency tries to create. I'ma be busy searching the poetry2nix repo's issues =P
my guess: fiass-logging needs pytest-runner, but does not specify so, or trying to download it during build (which is prohibited)
17:00:42
@mou_bugtracker:matrix.orgmou
In reply to @x10an14:matrix.org
https://paste.sr.ht/~x10an14/8b83382fa0c3a0352ed79f9757b7ae7ff7249263 <-- A python egg a different dependency tries to create. I'ma be busy searching the poetry2nix repo's issues =P
* my guess: fiass-logging needs pytest-runner, but does not specify so, or trying to download it during build (but this is prohibited)
17:00:59
@x10an14:matrix.orgx10an14
In reply to @mou_bugtracker:matrix.org
my guess: fiass-logging needs pytest-runner, but does not specify so, or trying to download it during build (but this is prohibited)
Good guess, I think you're onto something there. I'ma try some more, but it's defniitely in need of pytest-runner.
17:05:44
@mou_bugtracker:matrix.orgmouhttps://github.com/fiaas/logging/blob/cd8791332c932ed8a69b82e80986022b0d21af75/setup.py#L6917:08:41
@mou_bugtracker:matrix.orgmoupoetry2nix has no way to extract such metadata from python code (17:13:45
3 Mar 2022
@jairo:recallstack.icuJairo Llopis

Hello, while building a derivation with poetry2nix, I get this error:

error: unsupported build system requirement poetry-dynamic-versioning

I guess it comes from this part of the pyproject.toml file:

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"

Any clues on how to fix that problem?

12:32:37
@jairo:recallstack.icuJairo Llopis *

Hello, on nix build of a flake with poetry2nix, I get this error:

error: unsupported build system requirement poetry-dynamic-versioning

I guess it comes from this part of the pyproject.toml file:

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"

Any clues on how to fix that problem?

12:33:05
@jamie-howlie:monero.socialjamie-howlie joined the room.13:24:39
@dooygoy:matrix.orgdooygoy joined the room.13:25:47
@jamie-howlie:monero.socialjamie-howlieHi all, I'm trying to get my project going with poetry2nix for the first time. I'm not managing to get my shell working. I get an error "Missing suitable source/wheel file for entry" It comes from a library of our company, which is hosted in our private pypi server.13:27:29
@jamie-howlie:monero.socialjamie-howlieI have added our pypi server to the pyproject.toml, and if using it outsinde of nix I do manage to add the library to my virtual environment13:28:18
4 Mar 2022
@jmgilman:matrix.orgJoshua Gilman joined the room.18:01:52
@jmgilman:matrix.orgJoshua GilmanAnyone available to help troubleshoot failing build?18:04:09
@jmgilman:matrix.orgJoshua Gilman * Anyone available to help troubleshoot a failing build?18:04:22
5 Mar 2022
@dooygoy:matrix.orgdooygoy left the room.13:56:07

Show newer messages


Back to Room ListRoom Version: 6