2 Oct 2024 |
K900 | It could just be a poetry2nix bug | 14:20:26 |
mirorred_basilisk | In reply to @k900:0upti.me That is possible on some packages, yes getting a recursion error? | 14:20:57 |
K900 | Yes | 14:21:37 |
mirorred_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 | You can just move the contents of the flake into your config more or less unchanged | 14:22:30 |
mirorred_basilisk | oh yeah fair that's basically what i have, the flake is just a file in my config | 14:22:56 |
mirorred_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 | 14:33:02 |
mirorred_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 deps | 14:33:41 |
4 Oct 2024 |
| @ryoschin:matrix.org left the room. | 22:04:24 |
8 Oct 2024 |
| schuelermine changed their profile picture. | 16:33:14 |
9 Oct 2024 |
| john joined the room. | 01:20:20 |
| ShamrockLee (Yueh-Shun Li) set a profile picture. | 14:18:28 |
| schuelermine changed their profile picture. | 23:47:10 |
10 Oct 2024 |
| @milibopp:matrix.org left the room. | 09:10:54 |
| Oliver Bläse joined the room. | 20:34:11 |
11 Oct 2024 |
Oliver Bläse | hi, 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 |
TyberiusPrime (smilodon inopinatus) | are you adding fastapi[standard]? I think there was a github issue about this recently... | 11:01:35 |
Oliver Bläse | Yes, 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 |
Oliver 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 Unicorn version from my main package directly in Python. | 11:04:54 |
Oliver 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 joined the room. | 12:19:08 |
laurents | 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 | * 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 | * 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 | * 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 | 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 | This might just be a side effect of package name normalization | 15:17:07 |
laurents | it 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 | We try to normalize it across the ecosystem | 15:29:43 |
Oliver Bläse | Is 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 |