| 17 Feb 2022 |
K900 | It might be | 07:57:54 |
worldofgeese | I think my next step will be to build a container image with something like buildah or just writing a plain Dockerfile and test if it works that way. If it does, I'll file the issue as a dockerTools bug and let the packagers decide what it's a bug of | 08:00:17 |
| 21 Feb 2022 |
Jairo Llopis | Redacted or Malformed Event | 12:47:43 |
Jairo Llopis | hello people. I'm trying to get a proper devShell. So far I have followed the example from https://github.com/nix-community/poetry2nix#example-shellnix | 12:48:56 |
Jairo Llopis | It's working, but... poetry is not inside the shell. How to add it? | 12:49:14 |
Jairo Llopis | > nix develop -c which python
/nix/store/08aymzy89d1r2sviq2rn00ciip25wha4-python3-3.9.10-env/bin/python
> nix develop -c which poetry
/var/home/yajo/.local/bin/poetry
| 12:50:19 |
Jairo Llopis | See? I expected poetry to be available from the nix store instead... how to do that? | 12:51:02 |
Jairo Llopis | I tried adding poetry to extraPackages but didn't work:
devShell = prev.poetry2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
monix = ./monix;
};
extraPackages = ps: with ps; [
poetry
];
}.env;
It failed:
error: collision between `/nix/store/2bn57zh92ajirim070nkzqyp7ialwf3g-python3.9-poetry-core-1.0.7/lib/python3.9/site-packages/poetry/__init__.py' and `/nix/store/jv411g1gg5njclqnas9md97y0p55z06c-python3.9-poetry-1.1.12/lib/python3.9/site-packages/poetry/__init__.py'
| 12:52:11 |
| teraku joined the room. | 15:27:49 |
teraku | Hello! I'm trying to use poetry2nix for a kubeflow project we have. This means it unfortunately runs with Py3.6 (soon 3.8 I heard). I got to a point where I was able to specify Python 3.6, but now I am getting a version mismatch arrow:
error: arrow-cpp version (7.0) mismatches pyarrow version (2.0)
I'm not entirely sure where it gets arrow-cpp 7.0 from, my pyarrow version specified in the poetry.lock is 2.0.
My default.nix:
{ pkgs ? import <nixpkgs> {} }: let python36 = import <darwin20.python36> { system = "x86_64-darwin"; }; myAppEnv = pkgs.poetry2nix.mkPoetryEnv { projectDir = ./.; editablePackageSources = { ml-policy-compliance = ./ml_policy_compliance; }; }; in myAppEnv.env
| 15:36:05 |
teraku | * Hello! I'm trying to use poetry2nix for a kubeflow project we have. This means it unfortunately runs with Py3.6 (soon 3.8 I heard). I got to a point where I was able to specify Python 3.6, but now I am getting a version mismatch arrow:
error: arrow-cpp version (7.0) mismatches pyarrow version (2.0)
I'm not entirely sure where it gets arrow-cpp 7.0 from, my pyarrow version specified in the poetry.lock is 2.0.
My default.nix:
{ pkgs ? import <nixpkgs> {} }:
let
python36 = import <darwin20.python36> { system = "x86_64-darwin"; };
myAppEnv = pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
ml-policy-compliance = ./ml_policy_compliance;
};
};
in myAppEnv.env
| 15:36:19 |
teraku | Can somebody point me into the right direction here? | 15:37:29 |
teraku | darwin20 refers to an older channel: https://releases.nixos.org/nixpkgs/20.09-darwin/nixpkgs-darwin-20.09pre247167.1c1f5649bb9 | 15:40:28 |
mou | In reply to @jairo:recallstack.icu hello people. I'm trying to get a proper devShell. So far I have followed the example from https://github.com/nix-community/poetry2nix#example-shellnix Hi, Jairo. This is how i define devShell in most cases
devShell = (pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
exyaru = ./.;
};
}).env.overrideAttrs (oldAttrs: {
buildInputs = [ pkgs.poetry ];
});
| 18:08:52 |
mou | But it's better to do concatentation of oldAttrs.buildInputs with new list. But this works for my projects, because there is no buildInputs exists before overriding | 18:10:38 |
| K900 changed their display name from K900 to whatever. | 20:39:53 |
| K900 changed their display name from whatever to K900. | 20:40:08 |
| 22 Feb 2022 |
Jairo Llopis | In reply to @mou_bugtracker:matrix.org
Hi, Jairo. This is how i define devShell in most cases
devShell = (pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = {
exyaru = ./.;
};
}).env.overrideAttrs (oldAttrs: {
buildInputs = [ pkgs.poetry ];
});
thanks, it works! | 09:41:46 |
| x10an14 joined the room. | 15:21:37 |
x10an14 | 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... | 15:56:07 |
mou | 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 | It'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 dependency | 16:45:59 |
mou | sorry, i messed up. | 16:46:29 |
x10an14 | 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 | 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 | This is where prev comes from. It refers to pre-override nixpkgs | 16:49:28 |
mou | * This is where prev comes from. It refers to pre-overlay nixpkgs | 16:49:38 |
x10an14 | Ahh, gotcha. Thanks! =D | 16:49:45 |
mou | i should be more accurate next time. hope my guess is lucky ) | 16:50:52 |
x10an14 | 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 |