nix-tree icon indicating copy to clipboard operation
nix-tree copied to clipboard

Cannot copy to clipboard

Open Mr-Andersen opened this issue 1 year ago • 2 comments

Cannot copy to clipboard:
Running ("pbcopy",[]) failed with exception: pbcopy: startProcess: posix_spawnp: does not exist (No such file or directory).
Running ("wl-copy",[]) failed with exception: wl-copy: startProcess: posix_spawnp: does not exist (No such file or directory).
Running ("xclip",["-selection","clipboard"]) failed with exception: xclip: startProcess: posix_spawnp: does not exist (No such file or directory).
Running ("xsel",["-i","-b"]) failed with exception: xsel: startProcess: posix_spawnp: does not exist (No such file or directory).
Please report this as a bug.
> nix-tree --version
nix-tree 0.4.0

nixpkgs revision = 23ff7d9dc4f3d553939e7bfe0d2667198f993536

Mr-Andersen avatar Apr 11 '24 16:04 Mr-Andersen

This is know - and tricky to fix.

As you can see, we do go through a couple of possible apps to copy to clipboard (as I couldn't find a ready to use Haskell library that provides a cross platform copy-to-clipboard functionality). And if none exists, we fail. An easy fix would be to install one of them.

A better solution would be to update nixpkgs to add one of them as a runtime dependency. But I believe that'd introduce a dependency to X that I want to avoid. So we could add an optional (but default off) dependency, but at that point it'd be just easier for the users to install one of them instead of figuring out how to flip that flag on.

So what I'll do instead is that I'll fix the error message so it doesn't say "report this as a bug", but says something like "install ... application to use this functionality".

utdemir avatar Apr 11 '24 23:04 utdemir

Hello!

Can you please help me? I'm with plasma 5 x11, which clipboard tool from this list is for my case?

Best wishes, Sergei

spiage avatar Jun 10 '24 11:06 spiage