-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
glib: add bin output for gvfs executables #38486
Conversation
Note that there is a related FIXME comment in someplace else: https://github.com/Mic92/nixpkgs/blob/ef73fa9c095eee8a337c172998e2fd6719100ff1/pkgs/desktops/gnome-3/core/gnome-session/default.nix#L32 Does this perhaps fix that issue as well? If so, the no longer correct |
Good point. Maybe gvfs binaries also should be patched to always have |
@dezgeg IIRC, the comment refers to To put the issue into context, glib has three types of binaries:
Optimally, they would be in separate packages but since glib is monolithic, we should use different outputs. |
@@ -106,12 +106,15 @@ stdenv.mkDerivation rec { | |||
DETERMINISTIC_BUILD = 1; | |||
|
|||
postInstall = '' | |||
# needed by gvfs binaries | |||
mkdir -p $out/bin | |||
mv $dev/bin/gio $out/bin |
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 think bin output would be a best place for system utilities like gio
and gsettings
.
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.
@jtojnar can you help with what is needed when?
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gio
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gio-querymodules
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gapplication
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gdbus
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/glib-compile-resources
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/glib-mkenums
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gdbus-codegen
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gobject-query
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gresource
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gtester
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gsettings
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/glib-gettextize
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/glib-compile-schemas
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/glib-genmarshal
/nix/store/zylnjb0wljm7abn96jk5jv59lj1lmb7l-glib-2.56.0-dev/bin/gtester-report
Based on their usefulness in scripts, I think |
this fixes gvfs in caia (mate desktop)
--replace libglib-2.0.0.dylib ${glib}/lib/libglib-2.0.0.dylib \ | ||
--replace libgmodule-2.0.0.dylib ${glib}/lib/libgmodule-2.0.0.dylib \ | ||
--replace libgobject-2.0.0.dylib ${glib}/lib/libgobject-2.0.0.dylib | ||
--replace libglib-2.0.so.0 ${glib.out}/lib/libglib-2.0.so.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.
Maybe use stdenv.lib.getLib
for greater accuracy?
@@ -57,7 +57,7 @@ stdenv.mkDerivation rec { | |||
++ optional doCheck ./skip-timer-test.patch | |||
++ [ ./schema-override-variable.patch ]; | |||
|
|||
outputs = [ "out" "dev" "devdoc" ]; | |||
outputs = [ "bin" "out" "dev" "devdoc" ]; |
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.
Though I am not sure if the bin
output should be the primary one. cc @vcunat
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.
Yes that's correct. The intention is anybody can write ${pkgs.foo}/bin/bar
in their systemd unit scripts or whatever and have it work.
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.
Probably. So far we've only broken the convention for glibc
AFAIK.
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.
but beware of all the old code using ${glib}/lib/
and similar paths
Success on x86_64-darwin (full log) Attempted: glib The following builds were skipped because they don't evaluate on x86_64-darwin: gtkd Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: glib The following builds were skipped because they don't evaluate on aarch64-linux: gtkd Partial log (click to expand)
|
Another bin/ path that needs fixing besides the gnome-session one mentioned above:
|
Success on x86_64-linux (full log) Attempted: glib, gtkd Partial log (click to expand)
|
Using explicit output feels more flaky in case we e.g. move the binary. (No strong opinion on my side, feel free to revert if you think so.)
Success on aarch64-linux (full log) Attempted: glib The following builds were skipped because they don't evaluate on aarch64-linux: gtkd, tlaplus Partial log (click to expand)
|
Timed out, unknown build status on x86_64-linux (full log) Attempted: glib, gtkd, tlaplus Partial log (click to expand)
|
Timed out, unknown build status on x86_64-darwin (full log) Attempted: glib, tlaplus The following builds were skipped because they don't evaluate on x86_64-darwin: gtkd Partial log (click to expand)
|
Thanks for finishing that! |
this fixes gvfs in caja (mate desktop)
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)