New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mirage: init at 0.5.1 #84150
mirage: init at 0.5.1 #84150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a draft since the application doesn't work yet.
What happens when you run it from the command line?
@@ -0,0 +1,30 @@ | |||
{ mkDerivation, stdenv, lib, fetchFromGitHub, cmake, qtbase, qtquickcontrols2 | |||
, qtkeychain, qtmultimedia, qttools, libqmatrixclient_0_5, libQuotient, gnome3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libQuotient and libqmatrixclient are not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sorry, left in draft so people wouldn't review too closely. I just copied quaternion so there's lots of left over cruft. I'lll clean it up once it actually does something (anything) on launch.
@GrahamcOfBorg eval (bot's been having a bad time recently) |
If you just want to try out this app and don't feel like finishing the package, they provide an AppImage, which you can run/package through |
e3db78e
to
e52598b
Compare
e52598b
to
ffbfe1c
Compare
ffbfe1c
to
1eaac97
Compare
This is working for me now, but it needs cleanup before it's ready for review. |
1eaac97
to
ef5e21d
Compare
70ebc31
to
1c02541
Compare
eefca66
to
7b03f0f
Compare
pkgs/applications/networking/instant-messengers/mirage/default.nix
Outdated
Show resolved
Hide resolved
olm pyotherside | ||
]; | ||
|
||
propagatedBuildInputs = pypkgs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also causes the python interpreter to be exported, and it's not really needed since you're wrapping the executable anyway.
[nix-shell:/home/jon/.cache/nixpkgs-review/pr-84150-1]$ nix-shell --pure -p "with import ./nixpkgs {}; mirage-im"
[nix-shell:/home/jon/.cache/nixpkgs-review/pr-84150-1]$ python --version
Python 3.8.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove this line, I get these errors and it doesn't load:
~ 19:21:36 | Got library name: "/nix/store/3z4vm3gsf9zvsj9im9xmx8pmdia8cjqq-pyotherside-1.5.9/lib/qt-5.12.7/qml/io/thp/pyotherside/libpyothersideplugin.so"
~ 19:21:36 | Using Wayland-EGL
~ 19:21:36 | Using the 'xdg-shell' shell integration
~ 19:21:36 | "PyOtherSide error: Traceback (most recent call last):\n\n File \"qrc:/src/backend/qml_bridge.py\", line 26, in <module>\n from .pyotherside_events import CoroutineDone, LoopException\n\n File \"qrc:/src/backend/pyotherside_events.py\", line 8, in <module>\n from .utils import serialize_value_for_qml\n\n File \"qrc:/src/backend/utils.py\", line 23, in <module>\n import aiofiles\n\nModuleNotFoundError: No module named 'aiofiles'\n"
! 19:21:36 | Unhandled PyOtherSide error: Cannot import module: backend.qml_bridge (Traceback (most recent call last):
File "qrc:/src/backend/qml_bridge.py", line 26, in <module>
from .pyotherside_events import CoroutineDone, LoopException
File "qrc:/src/backend/pyotherside_events.py", line 8, in <module>
from .utils import serialize_value_for_qml
File "qrc:/src/backend/utils.py", line 23, in <module>
import aiofiles
ModuleNotFoundError: No module named 'aiofiles'
)
~ 19:21:36 | "PyOtherSide error: Traceback (most recent call last):\n\n File \"<string>\", line 1, in <module>\n\nNameError: name 'BRIDGE' is not defined\n"
! 19:21:36 | Unhandled PyOtherSide error: Function not found: 'BRIDGE.call_backend_coro' (Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'BRIDGE' is not defined
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to push these commits up just so you can verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I was looking into a way around this, the buildPythonPath
searches what being propagated to collect the entire python dependency tree. However, this also exports the python interpreter to the user's environment :(
pkgs/applications/networking/instant-messengers/mirage/default.nix
Outdated
Show resolved
Hide resolved
pkgs/applications/networking/instant-messengers/mirage/default.nix
Outdated
Show resolved
Hide resolved
19215e4
to
30c3330
Compare
30c3330
to
abf54cd
Compare
do you mind squashing/removing some of the fixup commits, particularly:
|
abf54cd
to
d83ba02
Compare
8d2aca1
to
fa027d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a way to improve this. I would like to prevent the python interpreter from getting propagated.
cc @FRidh
otherwise, the app seems to work, and the gui launches fine
https://github.com/NixOS/nixpkgs/pull/84150
1 package built:
mirage-im
One way to prevent propagation of python is: diff --git a/pkgs/applications/networking/instant-messengers/mirage/default.nix b/pkgs/applications/networking/instant-messengers/mirage/default.nix
index 1101d6f9b06..8e99ca64123 100644
--- a/pkgs/applications/networking/instant-messengers/mirage/default.nix
+++ b/pkgs/applications/networking/instant-messengers/mirage/default.nix
@@ -44,7 +44,10 @@ mkDerivation rec {
wrapProgram $out/bin/mirage \
--prefix PYTHONPATH : "$PYTHONPATH" \
"''${qtWrapperArgs[@]}"
- '';
+ '';
+ postFixup = ''
+ rm $out/nix-support -r
+ '';
meta = with lib; {
description = "A fancy, customizable, keyboard-operable Qt/QML+Python Matrix chat client for encrypted and decentralized communication."; |
Motivation for this change
Package new application
mirage
as attributemirage-im
(there's an existing alias, maybe I could remove it?).This is a draft since the application doesn't work yet.
This fixes #84147.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)