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

@Elyhaka
Copy link
Contributor

Elyhaka 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.
@Elyhaka Elyhaka force-pushed the Elyhaka:fix-sway-wrapper branch 2 times, most recently from cbb7401 to 5bf511e May 5, 2020
@Elyhaka Elyhaka requested a review from primeos May 5, 2020
Copy link
Member

primeos left a comment

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
@Elyhaka Elyhaka force-pushed the Elyhaka:fix-sway-wrapper branch 3 times, most recently from 311776a to 0625fb1 May 5, 2020
@worldofpeace
Copy link
Member

worldofpeace commented May 5, 2020

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

@Elyhaka
Copy link
Contributor Author

Elyhaka commented May 5, 2020

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

@Elyhaka Elyhaka force-pushed the Elyhaka:fix-sway-wrapper branch from 0625fb1 to d2ce9cd May 5, 2020
@ofborg ofborg bot requested review from Ma27, primeos and Synthetica9 May 5, 2020
@Elyhaka Elyhaka requested a review from worldofpeace May 5, 2020
@primeos
primeos approved these changes May 6, 2020
Copy link
Member

primeos left a comment

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"  "$@"
@Ma27
Ma27 approved these changes May 6, 2020
@primeos primeos merged commit cdfad5a into NixOS:master May 8, 2020
16 checks passed
16 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d2ce9cd"; rev="d2ce9cdf4bb3b809a82c174bb0ee6b726787ffe8"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d2ce9cd"; rev="d2ce9cdf4bb3b809a82c174bb0ee6b726787ffe8"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d2ce9cd"; rev="d2ce9cdf4bb3b809a82c174bb0ee6b726787ffe8"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d2ce9cd"; rev="d2ce9cdf4bb3b809a82c174bb0ee6b726787ffe8"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d2ce9cd"; rev="d2ce9cdf4bb3b809a82c174bb0ee6b726787ffe8"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d2ce9cd"; rev="d2ce9cdf4bb3b809a82c174bb0ee6b726787ffe8"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="d2ce9cd"; rev="d2ce9cdf4bb3b809a82c174bb0ee6b726787ffe8"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
sway, sway.passthru.tests on aarch64-linux Success
Details
sway, sway.passthru.tests on x86_64-linux Success
Details
@primeos
Copy link
Member

primeos commented May 8, 2020

@Elyhaka thanks :)

@Elyhaka
Copy link
Contributor Author

Elyhaka 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.

@Elyhaka Elyhaka mentioned this pull request May 17, 2020
0 of 10 tasks complete
Elyhaka added a commit to Elyhaka/nixpkgs that referenced this pull request May 17, 2020
Fixes NixOS#67704.

(cherry picked from commit cdfad5a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.