!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

322 Members
https://github.com/nix-community/poetry2nix62 Servers

Load older messages


SenderMessageTime
8 Nov 2023
@k900:0upti.meK900You use pyproject.toml14:59:29
@k900:0upti.meK900Which poetry2nix translates to a Nix shell definition14:59:35
@k900:0upti.meK900(see the example)14:59:38
@k900:0upti.meK900Oh wait14:59:56
@k900:0upti.meK900Shit14:59:58
@k900:0upti.meK900The example is bad15:00:01
@k900:0upti.meK900/me makes a mental note to fix the example15:00:08
@ryoschin:matrix.org@ryoschin:matrix.org
In reply to @k900:0upti.me
Which poetry2nix translates to a Nix shell definition
I guess that does explain the point of poetry2nix
15:00:42
@ryoschin:matrix.org@ryoschin:matrix.orgSo I must start it with nix-shell? I cannot use flake.nix with direnv to automatically do it?15:03:04
@k900:0upti.meK900You can use flake.nix15:03:46
@k900:0upti.meK900You just need to change the flake a little bit15:03:52
@petrichor:envs.net@petrichor:envs.net confusingly, the corresponding nixs flakes command to nix-shell is nix develop 15:04:24
@petrichor:envs.net@petrichor:envs.net that should work with a flake that has a devshells.${your system}.default output 15:04:48
@ryoschin:matrix.org@ryoschin:matrix.org

nix flake init --template github:nix-community/poetry2nix

All I did was modify this one by adding some packages. Is it not supposed to work by default, or?

15:04:59
@ryoschin:matrix.org@ryoschin:matrix.org
In reply to @petrichor:envs.net
confusingly, the corresponding nixs flakes command to nix-shell is nix develop
Right, and will direnv not do that by default?
15:05:35
@k900:0upti.meK900https://github.com/nix-community/poetry2nix/pull/140715:05:48
@k900:0upti.meK900Basically add this15:05:50
@petrichor:envs.net@petrichor:envs.net should do, if your .envrc includes use flake 15:07:18
@ryoschin:matrix.org@ryoschin:matrix.org
[tool.poetry.dependencies]
python = "^3.11"
discord = "^2.3.2"

This is the part where I specify the dependencies. And, while building with direnv, this popped out:

> ModuleNotFoundError: No module named 'setuptools'

15:41:44
@ryoschin:matrix.org@ryoschin:matrix.orgAside from that, after the change you made, it seems like direnv (or p2nix) did start automatically downloading the depencencies15:42:47
@k900:0upti.meK900 See https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md 15:43:54
@ryoschin:matrix.org@ryoschin:matrix.org error: attribute 'defaultPoetryOverrides' missing - Is this supposed to happen? 15:54:05
@ryoschin:matrix.org@ryoschin:matrix.org * error: attribute 'defaultPoetryOverrides' missing - Is this supposed to happen.. 15:55:51
@k900:0upti.meK900
In reply to @k900:0upti.me
You should update the line
^
15:57:59
@k900:0upti.meK900Read from that message down 15:58:05
@ryoschin:matrix.org@ryoschin:matrix.orgAlright, it's working. Thank you!16:22:23
@matthewcroughan:defenestrate.itmatthewcroughanHow do you build a specific "group" with poetry2nix functions?18:02:28
@matthewcroughan:defenestrate.itmatthewcroughan ah groups list of strings 18:03:16
@matthewcroughan:defenestrate.itmatthewcroughanI cannot stop a package from downloading the wheel, any pointers?20:09:33
@matthewcroughan:defenestrate.itmatthewcroughan
                triton = (super.triton.override { preferWheel = false; }).overridePythonAttrs
                  (
                    old: {
                      prePatch = ''
                        find ./ -name 'CMakeLists'
                        ls -lah $src
                        ls -lah $src
                        ls -lah $src
                        ls -lah $src
                        ls -lah $src
                        ls -lah $src
                        ls -lah $src
                        ls -lah $src
                        ls -lah $src
                      '';
                      nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.cmake ];
                    }
                  );

20:09:52

Show newer messages


Back to Room ListRoom Version: 6