| 29 Nov 2023 |
BenBot | :facepalm: | 16:11:35 |
BenBot | overrideAttrs AND overridePythonAttrs both work now
I guess i'm still pretty fuzzy on the ( and ) semantics in nix
| 16:12:04 |
K900 | Function application doesn't need spaces | 16:15:11 |
K900 | So you can do foo bar instead of foo(bar) | 16:15:22 |
K900 | But foo (bar) is parsed as foo bar | 16:15:37 |
K900 | So foo(bar).baz is parsed as foo (bar.baz), not foo(bar).baz | 16:15:52 |
BenBot | ahhh, that's what's tripping me up | 16:16:10 |
| 1 Dec 2023 |
| @ilpianista:kde.org joined the room. | 08:30:32 |
@ilpianista:kde.org | 'morning, I just upgraded to 23.11 and now I got the error about poetry2nix not being anymore in nixpkgs. Does this means that I've to switch my project to flakes to use poetry2nix? because I don't get how to fix my default.nix file to keep it working without flakes (I'm not against them, but I haven't explored them yet). Thanks! | 08:31:20 |
K900 | No | 08:50:54 |
K900 | You can just fetchTarball poetry2nix | 08:51:05 |
K900 | Or use something like niv that does input tracking without flakes | 08:51:14 |
@ilpianista:kde.org | ah, I see. That's great, thank you! | 08:52:03 |
| 2 Dec 2023 |
| mao_tse-tung joined the room. | 04:20:46 |
l0b0 | This job runs fine locally. What could be going on? | 22:00:36 |
l0b0 | * This job runs fine locally. What could be going on? Is poetry2nix incompatible with the nixos/nix:2.19.2 container? | 22:13:26 |
l0b0 | * This job runs fine locally. What could be going on? Is poetry2nix incompatible with the nixos/nix:2.19.2 container (I'm using Nix 2.18.1 locally)? | 22:13:53 |
| 3 Dec 2023 |
| zf zhang joined the room. | 03:24:48 |
zf zhang | Hi, glad to find this great nix tool and find you all here. I have a quick question. I am following this blog https://www.tweag.io/blog/2020-08-12-poetry2nix/ and | 03:27:49 |
zf zhang | * Hi, glad to find this great nix tool and find you all here. I have a quick question. I am following this blog https://www.tweag.io/blog/2020-08-12-poetry2nix/ and I enconter this error:
error: poetry2nix is now maintained out-of-tree. Please use https://github.com/nix-community/poetry2nix/
What does this mean and how to avoid that? Thx!
| 03:28:52 |
zf zhang | This is my default.nix:
| 03:29:13 |
zf zhang | * This is my default.nix updated and it still doesn't work:
{ pkgs ? import <nixpkgs> {} }:
let
poetry2nix = pkgs.poetry2nix.override {
poetry2nix = pkgs.nix-community.poetry2nix;
};
in
poetry2nix.mkPoetryApplication {
projectDir = ./.;
}
| 03:30:07 |
K900 | That's definitely not going to work | 07:24:38 |
K900 | Use the examples on the repo | 07:24:41 |
K900 | Or the example flake | 07:24:46 |
zf zhang | Thanks! with this config in the readme, I have got the same error.
{ poetry2nix, python3, runCommand }:
let
env = poetry2nix.mkPoetryEnv {
python = python3;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
};
in
runCommand "env-test"
{ } ''
${env}/bin/python -c 'import alembic'
touch $out
''
| 09:33:32 |
zf zhang | Using flake and nix build, it works as expected. | 09:33:53 |
zf zhang | * Thanks! with this config in the readme, I have got the same error.
let
pkgs = import <nixpkgs> {
overlays = [
# self & super refers to nixpkgs
(self: super: {
# p2self & p2super refers to poetry2nix
poetry2nix = super.poetry2nix.overrideScope' (p2nixself: p2nixsuper: {
# pyself & pysuper refers to python packages
defaultPoetryOverrides = p2nixsuper.defaultPoetryOverrides.extend (pyself: pysuper: {
my-custom-pkg = super.my-custom-pkg.overridePythonAttrs (oldAttrs: { });
});
});
})
];
};
in pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;
}
| 09:37:09 |
| 4 Dec 2023 |
l0b0 | Latest Nix (nixos/nix:2.19.2 container), nixpkgs@nixos-unstable (e92039b55bcd58469325ded85d4f58dd5a4eaf58), and poetry2nix@master (7eaec209686dd2a798fa0a86dc2118f4175abf34) don't seem to work together. Are these known to be broken together right now? | 07:13:19 |
| @milibopp:matrix.org joined the room. | 12:45:48 |