Pyautogui not working under poetry virtualenv

Hello everybody

I was trying to use python with pyautogui package in poetry on NixOS but I got hit by this error
NOTE: You must install tkinter on Linux to use MouseInfo. Run the following: sudo apt-get install python3-tk python3-dev
What should I do? I tried installing tkinter python pkg directly from system-wide pkg install and it didn’t work and as far as I know python-dev shouldn’t work, it needs python3-dev which make me feels it need shared library stuff, is there a way to get these stuff work under a nixos system? also what I should do if I wanna package a software with python and pyautogui for NixOS? (I guess if there is a package with pyautogui out there it would contain my solution, so if you know one, tell me)

I got the same issues while trying to get my video wallpaper working on KDE as well, some random library not being found and not being able to fix it at any cost (I know it would try to look for a path which in NixOS is basically empty and should use env vars and …)
but even a hacky (preferably reproducible) solution is much appreciated

I would appreciate a general answer for what should we do with those non-statically bonded dependencies like KDE-exts, binaries needs to be run with steam-run or python packages having these lib dependencies as a general case as well; what you do as a NixOS user when you face these? go make a nixpkg for them? have a fast workaround? should I have a dockerized env for these? or if I want edge of github things nixos shouldn’t be my thing?