Poetry2nix | 318 Members | |
| https://github.com/nix-community/poetry2nix | 59 Servers |
| Sender | Message | Time |
|---|---|---|
| 23 Jan 2022 | ||
import <nixpkgs> imports the channel | 14:14:05 | |
(and will fail if you're not using --impure) | 14:14:14 | |
| * also expression in lambda passed to
Does it import nixpkgs with revision locked by flake, or just version defined as channel? | 14:14:31 | |
| thanks for clarification | 14:14:45 | |
| So poetry2nix flake made all other functionality available through applying overlay to nixpkgs? So it kind of glue between everything defined in this flake modules and all other nix infrastructure? | 14:37:58 | |
| poetry2nix is included in nixpkgs | 14:38:30 | |
| The overlay just replaces the stable version in nixpkgs with the latest version from git | 14:38:43 | |
| Well, not really latest, but whichever one you have pinned | 14:38:50 | |
i'm trying to figure out how to work with shell and all my attempts to use mkPoetryEnv and using nix develop produces environments without python interpreter itself (and without poetry cli, but this is minor) even if derivation is called python3-3.9.9-env. I'm using snipets from Readme but have feelings i missed something important for understanding. | 14:50:53 | |
| But according to python mkPoetryEnv returns result of python.withPackages. I guess i need to read about this function too | 14:52:46 | |
I found problem. I should use as devShell not the entire attirbute set returned by mkPoetryEnv, but only attribute env | 15:16:12 | |
| 15:23:20 | ||
| I have a question, does poetry2nix use nixpkgs to download ANY of the python packages defined in poetry.lock or does it build all from source? | 15:24:09 | |
| It does, but exact cache hits are rare | 15:30:22 | |
| So you'll end up building most things from source | 15:30:44 | |
| Okay thanks! So if you create a default.nix for nixpkgs and submit it, then want to use that same package from poetry2nix you will probably have to redefine some build steps and dependencies twice for a complicated package? | 15:39:35 | |
| No | 15:39:58 | |
| poetry2nix will use the package definitions from nixpkgs | 15:40:13 | |
| But the build environment is slightly different usually, so you'll get rebuuldsn | 15:40:38 | |
| * But the build environment is slightly different usually, so you'll get rebuilds | 15:40:45 | |
| Ah okay, rebuilds are of course fine. Will it use the definition if the version for the package is different? | 15:41:52 | |
| Yes | 15:42:00 | |
| looks like i almost get my first working flake with dev environment but ended up with code duplication to solve external library build dependency on poetry. And i can not think of good solution to extract duplication. Maybe anybody can suggest good idiomatic solution?
| 15:43:35 | |
| * looks like i almost get my first working flake with dev environment but ended up with code duplication to solve external library build dependency on poetry. And i can not think of good solution to extract duplication. Maybe anybody can suggest good idiomatic solution?
| 15:43:57 | |
| Duplication is because i need override in mkPoetryApplication and in mkPoetryEnv | 15:44:29 | |
| * Duplication occurred because i need override in mkPoetryApplication and in mkPoetryEnv | 15:44:56 | |
| Is there a way of overriding the package version specified by poetry and just using whatever is defined in nixpkgs instead? The command I'm imagining might naively look like this:
| 16:18:23 | |
| Why do you want that? | 16:18:40 | |
| because the poetry build breaks | 16:18:56 | |
| Breaks how exactly? | 16:19:20 | |