| 19 May 2022 |
K900 | It declares a build system but Poetry doesn't track those correctly yet | 19:46:55 |
K900 | It's being worked on but for now poetry2nix has a list of overrides | 19:47:08 |
m1cr0man | oh I see.. these? https://github.com/nix-community/poetry2nix/blob/master/overrides/default.nix#L86 | 19:48:17 |
K900 | For the second one, it could be an upstream bug or it could be another build-dep issue | 19:48:35 |
K900 | https://github.com/nix-community/poetry2nix/blob/master/overrides/build-systems.json | 19:48:47 |
K900 | These. | 19:48:49 |
K900 | Well, these if it's just a missing dep, and the other ones if you need something fancier | 19:49:06 |
m1cr0man | Right I see. In terms of augmenting this in those examples I made, I can just put these overrides as overlays in my pkgs right? | 19:50:48 |
K900 | Yeah | 19:51:22 |
K900 | Also I looked up flake8-mutable and it's just really old and uses setup-requires | 19:51:39 |
K900 | Which I'm pretty sure has been deprecated multiple times by now but generally falls under the "poetry doesn't track build deps correctly" umbrella | 19:52:08 |
m1cr0man | I'm half tempted to drop these two deps but they are actually quite useful 😅 I wonder if there's newer alternatives though | 19:52:52 |
K900 | mypy? | 19:54:40 |
K900 | Assuming flake8-annotations does what I think it does | 19:54:52 |
m1cr0man | hm yeah that probably would work | 20:11:06 |
m1cr0man | Well with that sorted, I have another question. I want to set my flake's devShell to a mkPoetryEnv.env derivation, but I want to include poetry itself in the environment. Is there an easy way to do that? I tried adding poetry to extraPackages, but it confliced with poetry-core from somewhere else | 20:13:17 |
m1cr0man | * Well with that sorted, I have another question. I want to set my flake's devShell to a mkPoetryEnv.env derivation, but I want to include poetry itself in the environment (the PATH, that is). Is there an easy way to do that? I tried adding poetry to extraPackages, but it confliced with poetry-core from somewhere else | 20:13:49 |
K900 | It should already be there IIRC? | 20:14:37 |
K900 | Like by default | 20:14:43 |
m1cr0man | uhm, Unless I messed something up... let me try again | 20:14:56 |
m1cr0man | sorry got sidetracked.. yep definitely missing poetry | 20:38:20 |
m1cr0man | I'll set up an example in that repo | 20:39:26 |
K900 | Oh it's probably my global poetry | 20:39:41 |
K900 | Which I have globally | 20:39:44 |
m1cr0man | ok well here's an example of what I tried + the error https://github.com/m1cr0man/p2n-test/blob/main/dev-shell/build-log-python-env.log | 20:52:50 |
m1cr0man | I figured there might be a way to combine envs in the greater nixpkgs lib or something | 20:53:15 |
m1cr0man | that way I could just merge this with a devShell with poetry | 20:53:23 |
K900 | You can just overrideAttrs({ nativeBuildInputs = [poetry] }) | 20:53:51 |
K900 | That should work | 20:53:54 |
m1cr0man | Yep! :D
devShell = (pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
}).env.overrideAttrs(final: prev: { nativeBuildInputs = [pkgs.poetry]; });
| 20:56:02 |