!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

316 Members
https://github.com/nix-community/poetry2nix61 Servers

Load older messages


SenderMessageTime
19 May 2022
@k900:0upti.meK900mypy? 19:54:40
@k900:0upti.meK900 Assuming flake8-annotations does what I think it does 19:54:52
@m1cr0man:m1cr0man.comm1cr0manhm yeah that probably would work20:11:06
@m1cr0man:m1cr0man.comm1cr0man 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:m1cr0man.comm1cr0man * 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:0upti.meK900It should already be there IIRC? 20:14:37
@k900:0upti.meK900Like by default 20:14:43
@m1cr0man:m1cr0man.comm1cr0manuhm, Unless I messed something up... let me try again20:14:56
@m1cr0man:m1cr0man.comm1cr0mansorry got sidetracked.. yep definitely missing poetry20:38:20
@m1cr0man:m1cr0man.comm1cr0manI'll set up an example in that repo20:39:26
@k900:0upti.meK900Oh it's probably my global poetry20:39:41
@k900:0upti.meK900Which I have globally20:39:44
@m1cr0man:m1cr0man.comm1cr0manok 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.log20:52:50
@m1cr0man:m1cr0man.comm1cr0manI figured there might be a way to combine envs in the greater nixpkgs lib or something20:53:15
@m1cr0man:m1cr0man.comm1cr0manthat way I could just merge this with a devShell with poetry20:53:23
@k900:0upti.meK900You can just overrideAttrs({ nativeBuildInputs = [poetry] })20:53:51
@k900:0upti.meK900 That should work 20:53:54
@m1cr0man:m1cr0man.comm1cr0man

Yep! :D

        devShell = (pkgs.poetry2nix.mkPoetryEnv {
          projectDir = ./.;
        }).env.overrideAttrs(final: prev: { nativeBuildInputs = [pkgs.poetry]; });
20:56:02
@m1cr0man:m1cr0man.comm1cr0manok class, thanks for your help20:56:18
@m1cr0man:m1cr0man.comm1cr0manI tried getting flake8-annotations to build but couldn't figure out why it's trying to load some non-existent test case: https://github.com/m1cr0man/p2n-test/blob/main/flake8-annotations/override-build-log-flake8-annotations.log and I'm working tomorrow, so gotta leave it for tonight :P 22:49:17
20 May 2022
@jeff:ocjtech.usJeff joined the room.20:42:28
21 May 2022
@reivilibre:librepush.netreivilibre joined the room.13:24:35
@reivilibre:librepush.netreivilibreRedacted or Malformed Event13:27:36
@reivilibre:librepush.netreivilibre

Hi,

I'm trying to package a project that has exceptiongroup (https://github.com/agronholm/exceptiongroup/blob/main/pyproject.toml#L2) as an indirect dependency.

exceptiongroup specifies flit-scm as its build system.
When building, I get ModuleNotFoundError: No module named 'flit_scm' (https://github.com/reivilibreOrg/wombat000/blob/master/NIX_BUILD_LOG.log#L83)

Looking around, I realise I need to somehow pass in the build system as a build input, but I'm having a hard time finding the right incantation (the obvious thing of 'like poetry but flit-scm' didn't work)

                 exceptiongroup = super.exceptiongroup.overridePythonAttrs (old: {
                   # 'No module named flit_scm' for sdist
                   # workaround https://github.com/nix-community/poetry2nix/issues/568
                   buildInputs = old.buildInputs or [ ] ++ [ self.python.pkgs.flit-scm ];
                 });

(https://github.com/reivilibreOrg/wombat000/blob/master/flake.nix#L35-L39)
That tells me attribute 'flit-scm' missing (I've tried both flit-scm and flit_scm; it seems quite inconsistent)

I have a minimal example here: https://github.com/reivilibreOrg/wombat000
I've been using nix build .#apps.x86_64-linux.wombat000 -j 8

I appreciate this is likely to be a stupid mistake, but any thoughts on what I'm missing?

13:32:06
@reivilibre:librepush.netreivilibre *

Hi,

I'm trying to package a project that has exceptiongroup (https://github.com/agronholm/exceptiongroup/blob/main/pyproject.toml#L2) as an indirect dependency.

exceptiongroup specifies flit_scm as its build system.
When building, I get ModuleNotFoundError: No module named 'flit_scm' (https://github.com/reivilibreOrg/wombat000/blob/master/NIX_BUILD_LOG.log#L83)

Looking around, I realise I need to somehow pass in the build system as a build input, but I'm having a hard time finding the right incantation (the obvious thing of 'like poetry but flit-scm' didn't work)

                 exceptiongroup = super.exceptiongroup.overridePythonAttrs (old: {
                   # 'No module named flit_scm' for sdist
                   # workaround https://github.com/nix-community/poetry2nix/issues/568
                   buildInputs = old.buildInputs or [ ] ++ [ self.python.pkgs.flit-scm ];
                 });

(https://github.com/reivilibreOrg/wombat000/blob/master/flake.nix#L35-L39)
That tells me attribute 'flit-scm' missing (I've tried both flit-scm and flit_scm; it seems quite inconsistent)

I have a minimal example here: https://github.com/reivilibreOrg/wombat000
I've been using nix build .#apps.x86_64-linux.wombat000 -j 8

I appreciate this is likely to be a stupid mistake, but any thoughts on what I'm missing?

13:36:42
@reivilibre:librepush.netreivilibre I think the problem might be that flit_scm isn't packaged in Nix; in that case, do I need to package it myself...? :o 13:41:10
@reivilibre:librepush.netreivilibre That seems a little daunting and flit_scm is a flit project, not a poetry project, so I guess poetry2nix wouldn't be much use for packaging it 13:43:18
@reivilibre:librepush.netreivilibre Another question I have is: can I prevent poetry2nix building dev-dependencies? One of them is mypy and it takes aaaages to build, when the final result doesn't even use it. 14:48:47
@m1cr0man:m1cr0man.comm1cr0man
In reply to @reivilibre:librepush.net
Another question I have is: can I prevent poetry2nix building dev-dependencies? One of them is mypy and it takes aaaages to build, when the final result doesn't even use it.
I found setting doCheck = false in mkPoetryApplication did the trick :)
23:45:07
22 May 2022
@reivilibre:librepush.netreivilibre
In reply to @m1cr0man:m1cr0man.com
I found setting doCheck = false in mkPoetryApplication did the trick :)
Thank you very much!
09:20:23

There are no newer messages yet.


Back to Room ListRoom Version: 6