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

pass: add patch for basic wayland support #69643

Merged
merged 1 commit into from Sep 28, 2019

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Sep 27, 2019

Motivation for this change

This adds an upstream patch to support wl-clipboard for pass -c and
optionally wraps wl-clipboard. The patch is directly checked into
nixpkgs as it had to be modified to properly apply with
set-correct-name-for-sleep.patch.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 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.
Notify maintainers

cc @

This adds an upstream patch to support `wl-clipboard` for `pass -c` and
optionally wraps `wl-clipboard`. The patch is directly checked into
nixpkgs as it had to be modified to properly apply with
`set-correct-name-for-sleep.patch`.
@fpletz fpletz merged commit 1f85d77 into NixOS:master Sep 28, 2019
@Ma27 Ma27 deleted the pass-wayland-support branch September 28, 2019 09:49
@Ma27
Copy link
Member Author

Ma27 commented Sep 28, 2019

@fpletz does it make sense to you to backport this to 19.09?

@ryneeverett
Copy link
Contributor

Does anyone use this with sway? It works for me in a weston window but in sway the password doesn't end up on the clipboard.

@Ma27
Copy link
Member Author

Ma27 commented Jan 27, 2020

Yes I do, for several months now. wl-copy/wl-paste are installed? (Edit: wl-clipboard is automatically added to pass when using this).

Do you get any errors from sway or sth. like that? And is your terminal running on wayland or X (a.k.a Xwayland)?

@ryneeverett
Copy link
Contributor

ryneeverett commented Jan 27, 2020 via email

@Ma27
Copy link
Member Author

Ma27 commented Feb 5, 2020

Does it work if you do sth. like pass show ... | wl-copy? And do is X_SELECTION=primary in your env?

@ryneeverett
Copy link
Contributor

Thanks for the help and sorry for wasting your time.

After digging into it again I realized that pass was using wl-clipboard-1.0 whereas I have wl-clipboard-2.0 in my environment. Updating to a commit after wl-clipboard was updated to 2.0 fixes this. So as I was beginning to suspect my issue was caused by incompatibility with the stable channel.

This is the first time I've encountered an issue where importing a package from a commit on master yielded older dependencies than are on stable (since wl-clipboard-2.0 was backported) and it's making me question my approach. It seems like programmatically cherry-picking a list of commits to the stable channel before building would avoid such issues (and also streamline the process since one process would patch both modules and packages). I'm not aware of any tooling to do this but it wouldn't take a very big script to implement.

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.

None yet

3 participants