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
gnome-subtitles: init at 1.7.2 #95098
Conversation
57642e0
to
71ccc7a
Compare
Now I got the application to work ... it opens subtitles and supports video playback. |
71ccc7a
to
2fcec90
Compare
You are still doing far too much work that should be done by https://gist.github.com/danieldk/acfd76fb510803a8ec68f7a58f6cc053 It compiles and runs, but I didn't test it (it may require more dependencies for all functionality to work). Just meant as an example to show how these hooks work. |
2fcec90
to
453871c
Compare
Thanks a lot for giving the example. I didn't quite get what happens in preFixup phase ... if you have some referrences it would be
I added gstreamer and gst-plugins-bad in order for video playback to work. |
It creates a library path for the given derivations. https://nixos.org/nixpkgs/manual/#ssec-gnome-hooks (Last part of the section.)
Ack. |
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.
Looks pretty good to me. But I do not know much about GNOME or .NET. But perhaps @jtojnar or @jonringer have some time to look at it.
'' | ||
gappsWrapperArgs+=( | ||
--prefix MONO_PATH : "${gtk-sharp-3_0}/lib/mono/gtk-sharp-3.0" | ||
--prefix LD_LIBRARY_PATH : "${libPath}" |
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 am not fond of setting LD_LIBRARY_PATH
since it carries over to child processes, which can cause problems but I have not idea if there is a better way for Mono.
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.
Looking at https://gitlab.gnome.org/GNOME/gnome-subtitles/-/commit/bae6f6d853c70ede461440ce8002913ea1472089#18517c06227b99052bf39e2200684fc54a4f8b8f_3_3, would it be possible to hardcode the library here instead of using LD_LIBRARY_PATH
?
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 did just that with a patch. It builds fine but the gnome-subtitles
executable complains about not finding libglib-2.0.so.0
and I tried fixing that by adding:
<dllmap dll="libglib-2.0-0" target="libglib-2.0.so.0" />
But it does not work.
The patch I applied:
diff --git a/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config b/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
index fa663ae..c596624 100644
--- a/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
+++ b/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
@@ -1,5 +1,7 @@
<configuration>
<dllmap dll="libgtk" target="libgtk-3.so.0" />
- <dllmap dll="libenchant" target="libenchant.so.1" />
+ <dllmap dll="libenchant" target="libenchant-2.so.2" />
<dllmap dll="libgtkspell" target="libgtkspell3-3.so.0" />
+ <dllmap dll="libdl" target="libdl.so" />
+ <dllmap dll="libglib-2.0-0" target="libglib-2.0.so.0" />
</configuration>
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.
Maybe try absolute paths in target?
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.
Maybe try absolute paths in target?
I went down this path it seems to be a dead end.
libglib = gnome3.glib.out;
patches = [
(substituteAll {
src = ./libraries.patch;
inherit libglib;
})
];
diff --git a/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config b/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
index fa663ae..c596624 100644
--- a/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
+++ b/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
@@ -1,5 +1,7 @@
<configuration>
<dllmap dll="libgtk" target="libgtk-3.so.0" />
- <dllmap dll="libenchant" target="libenchant.so.1" />
+ <dllmap dll="libenchant" target="libenchant-2.so.2" />
<dllmap dll="libgtkspell" target="libgtkspell3-3.so.0" />
+ <dllmap dll="libdl" target="libdl.so" />
+ <dllmap dll="libglib-2.0-0" target="@libglib@/lib/libglib-2.0.so.0" os="linux" />
</configuration>
When launching the binary:
Unhandled Exception:
System.DllNotFoundException: libglib-2.0.so.0
at (wrapper managed-to-native) GLib.Log.g_log_set_default_handler(GLib.Log/LogFuncNative,intptr)
at GLib.Log.SetDefaultHandler (GLib.LogFunc log_func) [0x0002b] in <3eb93253711f4c08b41956dc83a81a30>:0
at GnomeSubtitles.Execution.Executable.Main (System.String[] args) [0x0003a] in <f33d384ba6534837888bffb49690ae3f>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libglib-2.0.so.0
at (wrapper managed-to-native) GLib.Log.g_log_set_default_handler(GLib.Log/LogFuncNative,intptr)
at GLib.Log.SetDefaultHandler (GLib.LogFunc log_func) [0x0002b] in <3eb93253711f4c08b41956dc83a81a30>:0
at GnomeSubtitles.Execution.Executable.Main (System.String[] args) [0x0003a] in <f33d384ba6534837888bffb49690ae3f>:0
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.
Still not found a way to avoid using LD_LIBRARY_PATH
. But the present code works. And the update from 1.6 to 1.7.2 made the packaging a little easier (not having to patch files).
453871c
to
69d4d59
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.
otherwise LGTM with inclusion of @jtojnar 's recommendations
69d4d59
to
229b91b
Compare
229b91b
to
3d8bc1e
Compare
@ofborg eval |
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.
pkgconfig is not longer available with allowAliases = false;
Hi what's the state of this? Can I pick it up? |
Sure, if you want to. |
bfb67dd
to
c6fc117
Compare
I just did small changes to the code. However I don't know how to address this one: #95098 (comment) @locallycompact you're welcome to take a look... I would like to give a hand if I can, and submit this PR... I can add you as maintainer as well if you want |
I marked this as stale due to inactivity. → More info |
c6fc117
to
8771a20
Compare
8771a20
to
ef8e538
Compare
ef8e538
to
6d69398
Compare
Closing as dead |
Motivation for this change
WIP. Adding the gnome-subtitle package to the repo as requested here: #92176
Things done
Now the package builds and runs fine.
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)