| 22 Aug 2022 |
adisbladis | Propagating it would only serve to add it to $PATH and for hooks to be able to pick up the input | 05:08:23 |
adisbladis | 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 |
adisbladis | I think using wrapgappshook would fix it | 05:12:54 |
adisbladis | 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 |
adisbladis | (it didn't actually work) | 05:21:11 |
adisbladis | This gobject stuff is an absolute packaging nightmare | 05:21:21 |
adisbladis | But I think that's the functionality you're looking for | 05:23:34 |
Jeff | yeah, just adding wrapGAppsHook didn't do anything, maybe it doesn't know how to wrap a python app? | 15:33:53 |
| 23 Aug 2022 |
| Echo joined the room. | 00:49:09 |
plato | 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 | 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 joined the room. | 18:44:41 |
| 24 Aug 2022 |
Ethan 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 |
Ethan Brooks | I have a minimal flake.nix/pyproject.toml to reproduce. | 19:00:27 |
Bryan | Ethan Brooks: This looks to be a similar problem? https://github.com/nix-community/poetry2nix/issues/46 | 19:26:05 |
Bryan | 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 |
Ethan Brooks | Hi 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 |
Ethan Brooks | Also, what would be the best way to remove the docs/ directory? | 19:44:05 |
Bryan | Honestly, I'm not sure | 19:44:05 |
Bryan | * Honestly, I'm not sure why they're colliding. | 19:44:20 |
Bryan | 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 |
Ethan Brooks | I see | 19:46:24 |
Bryan | It's worth trying, at least :) | 19:46:37 |
Ethan Brooks | So just
prePatch = ''
export HOME=$TMPDIR;
rm -rf docs/
'';
| 19:46:50 |
Ethan Brooks | or would we need to use an absolute path | 19:47:02 |
Ethan Brooks | um I think that worked actually | 19:47:31 |
Ethan Brooks | one sec | 19:47:32 |
Ethan Brooks | haha yeah that did it | 19:47:43 |
Bryan | I would do it like so:
| 19:48:00 |
Bryan | Redacted or Malformed Event | 19:48:04 |