!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
2 Oct 2024
@mirorred_basilisk:matrix.orgmirorred_basilisk
In reply to @k900:0upti.me
That is possible on some packages, yes
getting a recursion error?
14:20:57
@k900:0upti.meK900Yes14:21:37
@mirorred_basilisk:matrix.orgmirorred_basilisk
In reply to @k900:0upti.me
You can just define a package directly in your config
could you point me to some relevant docs? All the ones I've found seem to imply that to define a package you need to write a flake
14:21:48
@k900:0upti.meK900You can just move the contents of the flake into your config more or less unchanged14:22:30
@mirorred_basilisk:matrix.orgmirorred_basiliskoh yeah fair that's basically what i have, the flake is just a file in my config14:22:56
@mirorred_basilisk:matrix.orgmirorred_basiliskyeah okay it seems like a partially fixed issue with poetry2nix and some packages? I guess i'll make a new issue about it14:33:02
@mirorred_basilisk:matrix.orgmirorred_basilisk * yeah okay it seems like a partially fixed issue with poetry2nix and some packages? I guess i'll make a new issue about it / see if i can fix the deps14:33:41
4 Oct 2024
@ryoschin:matrix.org@ryoschin:matrix.org left the room.22:04:24
8 Oct 2024
@schuelermine:matrix.orgschuelermine changed their profile picture.16:33:14
9 Oct 2024
@john:friendsgiv.ingjohn joined the room.01:20:20
@shamrocklee:matrix.orgShamrockLee (Yueh-Shun Li) set a profile picture.14:18:28
@schuelermine:matrix.orgschuelermine changed their profile picture.23:47:10
10 Oct 2024
@milibopp:matrix.org@milibopp:matrix.org left the room.09:10:54
@blaese:matrix.uni-marburg.deOliver Bläse joined the room.20:34:11
11 Oct 2024
@blaese:matrix.uni-marburg.deOliver Bläsehi, i want to use poetry2nix to deploy my fastapi application, is there a way to implement the fastapi cli tool to it, so i can benefit from thair well structured logs?06:34:34
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)are you adding fastapi[standard]? I think there was a github issue about this recently...11:01:35
@blaese:matrix.uni-marburg.deOliver BläseYes, I think this has something to do with the fact that the packages are in a different location in the Nix system.11:03:36
@blaese:matrix.uni-marburg.deOliver BläseAnd I currently don't know how I can start my application in the scripts section with the CLI. I only know the Unicorn version from my main package directly in Python.11:04:54
@blaese:matrix.uni-marburg.deOliver Bläse* And I currently don't know how I can start my application in the scripts section with the CLI. I only know the Unicrin version from my main package directly in Python.11:05:12
12 Oct 2024
@laurents:fsfe.orglaurents joined the room.12:19:08
@laurents:fsfe.orglaurents

Hi all, I am using poetry2nix and crane to build a polars expression in rust for use in python. The setup works outside nix, but I'm struggling to make it work with nix. Each part works fine, but as soon as I add the rust wheel to pyproject.toml, the build fails with:

error: path '/nix/store/msa2hjlaa5dplqcynlcfkjrfs6hv4kck-source/data_pipeline/ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl' does not exist

My pyproject.toml looks like this (most stuff removed for clarity). Basically the rust code is in a subfolder ofd_expressions.

[tool.poetry.dependencies]
python = ">3.11.0,<3.12"
[...more packages...]
ofd_expressions = { file = "ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl" }
    crateWheel =
      (craneLib.buildPackage (
        crateCfg
        // {
          pname = projectName;
          version = projectVersion;
          # cargoArtifacts = crateArtifacts;
        }
   # this points to the wheel that is built by crane
    crateWheelSrc = "${crateWheel}/${wheelName}";

    pkgOverrides = pkgs.poetry2nix.overrides.withDefaults (
      final: prev: {
        ofd_expressions = prev.ofd_expressions.overridePythonAttrs (old: {
         # neither of these seem to change the error message
          # src = crateWheelSrc;
          src = "${crateWheel}";
        });
      }
    );

    dagitApp = pkgs.poetry2nix.mkPoetryApplication {
      overrides = pkgOverrides;
      projectDir = ./.;
      preferWheels = true;
The override does not seem to have any effect, I get the same error whether I add it or not. What am I doing wrong?
12:47:14
@laurents:fsfe.orglaurents *

Hi all, I am using poetry2nix and crane to build a polars expression in rust for use in python. The setup works outside nix, but I'm struggling to make it work with nix. Each part works fine, but as soon as I add the rust wheel to pyproject.toml, the build fails with:

error: path '/nix/store/msa2hjlaa5dplqcynlcfkjrfs6hv4kck-source/data_pipeline/ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl' does not exist

My pyproject.toml looks like this (most stuff removed for clarity). Basically the rust code is in a subfolder ofd_expressions.

[tool.poetry.dependencies]
python = ">3.11.0,<3.12"
[...more packages...]
ofd_expressions = { file = "ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl" }
    crateWheel =
      (craneLib.buildPackage (
        crateCfg
        // {
          pname = projectName;
          version = projectVersion;
          # cargoArtifacts = crateArtifacts;
        }
   # this points to the wheel that is built by crane
    crateWheelSrc = "${crateWheel}/${wheelName}";

    pkgOverrides = pkgs.poetry2nix.overrides.withDefaults (
      final: prev: {
        ofd_expressions = prev.ofd_expressions.overridePythonAttrs (old: {
         # neither of these seem to change the error message
          # src = crateWheelSrc;
          src = "${crateWheel}";
        });
      }
    );

    dagitApp = pkgs.poetry2nix.mkPoetryApplication {
      overrides = pkgOverrides;
      projectDir = ./.;
      preferWheels = true;

The override does not seem to have any effect, I get the same error whether I add it or not. What am I doing wrong?
13:07:39
@laurents:fsfe.orglaurents *

Hi all, I am using poetry2nix and crane to build a polars expression in rust for use in python. The setup works outside nix, but I'm struggling to make it work with nix. Each part works fine, but as soon as I add the rust wheel to pyproject.toml, the build fails with:

error: path '/nix/store/msa2hjlaa5dplqcynlcfkjrfs6hv4kck-source/data_pipeline/ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl' does not exist

My pyproject.toml looks like this (most stuff removed for clarity). Basically the rust code is in a subfolder ofd_expressions.

[tool.poetry.dependencies]
python = ">3.11.0,<3.12"
[...more packages...]
ofd_expressions = { file = "ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl" }
    crateWheel =
      (craneLib.buildPackage (
        crateCfg
        // {
          pname = projectName;
          version = projectVersion;
          # cargoArtifacts = crateArtifacts;
        }
   # this points to the wheel that is built by crane
    crateWheelSrc = "${crateWheel}/${wheelName}";

    pkgOverrides = pkgs.poetry2nix.overrides.withDefaults (
      final: prev: {
        ofd_expressions = prev.ofd_expressions.overridePythonAttrs (old: {
         # neither of these seem to change the error message
          # src = crateWheelSrc;
          src = "${crateWheel}";
        });
      }
    );

    dagitApp = pkgs.poetry2nix.mkPoetryApplication {
      overrides = pkgOverrides;
      projectDir = ./.;
      preferWheels = true;

The override does not seem to have any effect, I get the same error whether I add it or not. What am I doing wrong?
13:08:21
@laurents:fsfe.orglaurents *

Hi all, I am using poetry2nix and crane to build a polars expression in rust for use in python. The setup works outside nix, but I'm struggling to make it work with nix. Each part works fine, but as soon as I add the rust wheel to pyproject.toml, the build fails with:

error: path '/nix/store/msa2hjlaa5dplqcynlcfkjrfs6hv4kck-source/data_pipeline/ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl' does not exist

My pyproject.toml looks like this (most stuff removed for clarity). Basically the rust code is in a subfolder ofd_expressions.

[tool.poetry.dependencies]
python = ">3.11.0,<3.12"
[...more packages...]
ofd_expressions = { file = "ofd_expressions/target/wheels/ofd_expressions-0.1.0-cp311-abi3-linux_x86_64.whl" }
        crateWheel =
          (craneLib.buildPackage (
            crateCfg
            // {
              pname = projectName;
              version = projectVersion;
              # cargoArtifacts = crateArtifacts;
            }
       # this points to the wheel that is built by crane
        crateWheelSrc = "${crateWheel}/${wheelName}";

        pkgOverrides = pkgs.poetry2nix.overrides.withDefaults (
          final: prev: {
            ofd_expressions = prev.ofd_expressions.overridePythonAttrs (old: {
             # neither of these seem to change the error message
              # src = crateWheelSrc;
              src = "${crateWheel}";
            });
          }
        );

        dagitApp = pkgs.poetry2nix.mkPoetryApplication {
          overrides = pkgOverrides;
          projectDir = ./.;
          preferWheels = true;

The override does not seem to have any effect, I get the same error whether I add it or not. What am I doing wrong?

13:08:30
@laurents:fsfe.orglaurents

I figured it out. The name is ofd_expressions, but the override must be named ofd-expressions Those were 8 hours well spent... :/

15:13:01
@k900:0upti.meK900This might just be a side effect of package name normalization 15:17:07
@laurents:fsfe.orglaurentsit seems so, I found a note in the page about edge cases. I wonder if it could be made a bit more obvious in the readme. I'm new to nix, is this specific to poetry2nix or standard across the ecosystem?15:21:03
@k900:0upti.meK900We try to normalize it across the ecosystem 15:29:43
@blaese:matrix.uni-marburg.deOliver BläseIs it recommended to use the commands from the scripts section from your byproduct or is a custom command with uvicorn equivalent? I invoke my start parameter with an .env file and both versions support this, what should I decide?15:32:20
@laurents:fsfe.orglaurents
In reply to @k900:0upti.me
We try to normalize it across the ecosystem
good to keep in mind then. Thanks!
15:35:47

Show newer messages


Back to Room ListRoom Version: 6