Skip to content
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

sway: fix gtk wrapper #86960

Merged
merged 1 commit into from May 8, 2020
Merged

sway: fix gtk wrapper #86960

merged 1 commit into from May 8, 2020

Conversation

ghost
Copy link

@ghost ghost commented May 5, 2020

Motivation for this change

The GTK Sway wrapper is broken, to make it works I had to:

  • Add gtk3 and glib in the buildInputs
  • Triggers gappsWrapperArgsHook manually

This should fix #67704

cc @primeos @ymarkus

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested execution of all binary files (usually in ./result/bin/)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@primeos primeos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused about the nativeBuildInputs change, but apart from that the diff looks ok. I can run some tests tomorrow.

pkgs/applications/window-managers/sway/wrapper.nix Outdated Show resolved Hide resolved
@worldofpeace
Copy link
Contributor

We need to backport this to 20.03 because gappsWrapperArgsHook we backported there.

@worldofpeace worldofpeace added the 9.needs: port to stable A PR needs a backport to the stable release. label May 5, 2020
@ghost
Copy link
Author

ghost commented May 5, 2020

@primeos You were perfectly right, the modification about nativeBuildInputs was not necessary at all.

@ofborg ofborg bot requested review from Ma27, primeos and Synthetica9 May 5, 2020 20:19
@ghost ghost requested a review from worldofpeace May 5, 2020 20:34
Copy link
Member

@primeos primeos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff and result LGTM now :)
@worldofpeace are you ok with the current version as well?


And to keep a record of the current state:

Old wrapper:

#! /nix/store/kgp3vq8l9yb8mzghbw83kyr3f26yqvsz-bash-4.4-p23/bin/bash -e
export PATH='/nix/store/djkyx5ibn9fnsnh6kl39a37im0fah1dx-swaybg-1.0/bin'${PATH:+':'}$PATH
export GIO_EXTRA_MODULES='/nix/store/4fq6w7ksq1dba80sxpdgzrxpd46kdjgq-dconf-0.36.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
export GIO_EXTRA_MODULES='/nix/store/4fq6w7ksq1dba80sxpdgzrxpd46kdjgq-dconf-0.36.0-lib/lib/gio/modules'${GIO_EXTRA_MODULES:+':'}$GIO_EXTRA_MODULES
exec -a "$0" "/nix/store/ab7wxprzwk93zwcd2zpi5wf8y2il2gyl-sway-1.4/bin/.sway-wrapped"  "$@"

Diff to the new wrapper:

-exec -a "$0" "/nix/store/ab7wxprzwk93zwcd2zpi5wf8y2il2gyl-sway-1.4/bin/.sway-wrapped"  "$@"
+export GDK_PIXBUF_MODULE_FILE='/nix/store/d0r5r3zcjipx1qxqxmf1mqzwbay04vq3-librsvg-2.48.2/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache'
+export XDG_DATA_DIRS='/nix/store/6yrlycwcnxlgg6bkhq4jvwmahyrj00id-gtk+3-3.24.17/share/gsettings-schemas/gtk+3-3.24.17:/nix/store/78x2nyfhhili5ijd6l74z3flj63p92s0-gsettings-desktop-schemas-3.36.0/share/gsettings-schemas/gsettings-desktop-schemas-3.36.0'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
+export XDG_DATA_DIRS='/nix/store/sc216i8nxdw9c2j4jzspgza0xy09allw-sway-1.4/share'${XDG_DATA_DIRS:+':'}$XDG_DATA_DIRS
+exec -a "$0" "/nix/store/sc216i8nxdw9c2j4jzspgza0xy09allw-sway-1.4/bin/.sway-wrapped"  "$@"

@primeos primeos merged commit cdfad5a into NixOS:master May 8, 2020
@primeos
Copy link
Member

primeos commented May 8, 2020

@elyhaka thanks :)

@ghost
Copy link
Author

ghost commented May 17, 2020

@worldofpeace told that we should backport it to 20.03. I haven't done any backport yet, I just have to cherry pick this commit over the current 20.03 branch and open another PR ?

@primeos
Copy link
Member

primeos commented May 17, 2020

@elyhaka right, I forgot about that, thanks :)
Yes, cherry-pick with the -x parameter and use the branch release-20.03.

@ghost ghost mentioned this pull request May 17, 2020
10 tasks
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/some-lose-ends-for-sway-on-nixos-which-we-should-fix/17728/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sway: gsettings executed from sway/config fails
4 participants