!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
22 Aug 2022
@adis:blad.isadisbladis Propagating it would only serve to add it to $PATH and for hooks to be able to pick up the input 05:08:23
@adis:blad.isadisbladis But at runtime it's all up to the generated wrapper which doesn't know how to do anything sensible for gi to know about gtk 05:08:47
@adis:blad.isadisbladisI think using wrapgappshook would fix it05:12:54
@adis:blad.isadisbladis
diff --git a/flake.nix b/flake.nix
index 92490f7..5e0302f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -28,6 +28,9 @@
           gnome-random-background = pkgs.poetry2nix.mkPoetryApplication {
             python = pkgs.python310;
             projectDir = ./.;
+            nativeBuildInputs = [
+              pkgs.wrapGAppsHook
+            ];
             propagatedBuildInputs = [
               pkgs.cairo
               pkgs.gobject-introspection
05:13:02
@adis:blad.isadisbladis(it didn't actually work)05:21:11
@adis:blad.isadisbladisThis gobject stuff is an absolute packaging nightmare05:21:21
@adis:blad.isadisbladisBut I think that's the functionality you're looking for05:23:34
@jeff:ocjtech.usJeffyeah, just adding wrapGAppsHook didn't do anything, maybe it doesn't know how to wrap a python app?15:33:53
23 Aug 2022
@callmeecho:matrix.orgEcho joined the room.00:49:09
@plato:matrix.orgplato I'd like to have a derivation that includes not just my poetry.scripts (which are in Python) but also an external script that calls my Python application (think gunicorn). The docs mention dependencyEnv, but don't indicate how to create a standalone script that uses it. 06:55:42
@gmacon:matrix.orggmacon On Linux, with https://github.com/gmacon/poetry2nix-simple-numpy-failure, nix build .#app fails the tests because it cannot find libgfortran while importing numpy. If you use a shell from poetry shell instead, pytest can find libgfortran, but a Python REPL cannot. If you remove the tool.poetry.source block from pyproject.toml and run poetry lock then everything works OK. Does anyone have any idea what could be the problem here? 18:06:52
@bryan.bennett:matrix.orgBryan joined the room.18:44:41
24 Aug 2022
@ethanabrooks:matrix.orgEthan Brooks

Hello, I was hoping I could get help with the following error:

error: collision between `/nix/store/6f3p70mq7hdpsd6g87chp5pypklkkvv8-python3.9-optax-0.1.3/lib/python3.9/site-packages/docs/conf.py' and `/nix/store/lw3a5zgbb27cy0y5j4k9n1n1dnnbx34b-python3.9-ml_collections-0.1.1/lib/python3.9/site-packages/docs/conf.py'
18:59:09
@ethanabrooks:matrix.orgEthan Brooks I have a minimal flake.nix/pyproject.toml to reproduce. 19:00:27
@bryan.bennett:matrix.orgBryan Ethan Brooks: This looks to be a similar problem? https://github.com/nix-community/poetry2nix/issues/46 19:26:05
@bryan.bennett:matrix.orgBryan I think you'll need to investigate optax and ml_collections and see what needs to happen. I suspect that both packages use sphinx (that's the conf.py, right?) and it would simply be safe to remove the docs subdirectory from one or both. If you're using preferWheels, it's marginally more difficult (you need to unpack and repack the wheel, I think). 19:29:48
@ethanabrooks:matrix.orgEthan BrooksHi Bryan thanks for the response. So is the issue that they require different versions of sphinx? What exactly is colliding with what?19:43:52
@ethanabrooks:matrix.orgEthan Brooks Also, what would be the best way to remove the docs/ directory? 19:44:05
@bryan.bennett:matrix.orgBryanHonestly, I'm not sure19:44:05
@bryan.bennett:matrix.orgBryan * Honestly, I'm not sure why they're colliding.19:44:20
@bryan.bennett:matrix.orgBryan Ethan Brooks: You could remove the docs/ subdirectory inside a hook.
Looking at your flake, you already have a prePatch for ml-collections. You could probably just add it there?
19:46:08
@ethanabrooks:matrix.orgEthan BrooksI see19:46:24
@bryan.bennett:matrix.orgBryanIt's worth trying, at least :)19:46:37
@ethanabrooks:matrix.orgEthan Brooks

So just

          prePatch = ''
            export HOME=$TMPDIR;
             rm -rf docs/
          '';
19:46:50
@ethanabrooks:matrix.orgEthan Brooksor would we need to use an absolute path19:47:02
@ethanabrooks:matrix.orgEthan Brooksum I think that worked actually19:47:31
@ethanabrooks:matrix.orgEthan Brooksone sec19:47:32
@ethanabrooks:matrix.orgEthan Brookshaha yeah that did it19:47:43
@bryan.bennett:matrix.orgBryan

I would do it like so:

19:48:00
@bryan.bennett:matrix.orgBryanRedacted or Malformed Event19:48:04

There are no newer messages yet.


Back to Room ListRoom Version: 6