aweinstock314 / rust-clipboard

System Clipboard interfacing library in Rust
Apache License 2.0
361 stars 72 forks source link

target_os="linux" prevents rust-clipboard from being used in the BSD's where it works perfectly. #49

Closed pbgc closed 6 years ago

pbgc commented 6 years ago

Hi,

[target.'cfg(target_os = "linux")'.dependencies] on Cargo.toml and

[cfg(target_os="linux")] on lib.rs

prevents rust-clipboard from working on the BSD's.

If you change to [target.'cfg(target_os = "unix")'.dependencies] Cargo.toml

[cfg(target_os="unix")]

lib.rs

It will work on both Linux and BSD's.

I tested several times (by cloning, changing to unix and then altering the Cargo.toml of the project I wanted to build to use the path, for example in https://amp.rs/) and rust-clipboard works perfectly on FreeBSD.

I can send a PR if you want.

EDIT: In alternative, because I only tested in FreeBSD I can make a PR with entries for target_os="freebsd"

aweinstock314 commented 6 years ago

I've changed the target_os to "unix". Thanks for reporting this, I'm glad to hear that it works on FreeBSD.