Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / wl / wl-clipboard-rs / package.nix
blob2b881a35d25681aef4a2ac9c805a8bb0027e0974
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , pkg-config
5 , wayland
6 , withNativeLibs ? false
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "wl-clipboard-rs";
11   version = "0.9.0";
13   src = fetchFromGitHub {
14     owner = "YaLTeR";
15     repo = "wl-clipboard-rs";
16     rev = "v${version}";
17     hash = "sha256-qwlR/PJivCgQTXe027zuQxq0iVJ3/BLg6LAD3w5tb9Y=";
18   };
20   cargoHash = "sha256-C3vhZq5IHtbfg2mYYdQRqaLSA0iSER8zRaKi72FCd+E=";
22   cargoBuildFlags = [
23     "--package=wl-clipboard-rs"
24     "--package=wl-clipboard-rs-tools"
25   ] ++ lib.optionals withNativeLibs [
26     "--features=native_lib"
27   ];
29   nativeBuildInputs = lib.optionals withNativeLibs [
30     pkg-config
31   ];
33   buildInputs = lib.optionals withNativeLibs [
34     wayland
35   ];
37   preCheck = ''
38     export XDG_RUNTIME_DIR=$(mktemp -d)
39   '';
41   # Assertion errors
42   checkFlags = [
43     "--skip=tests::copy::copy_large"
44     "--skip=tests::copy::copy_multi_no_additional_text_mime_types_test"
45     "--skip=tests::copy::copy_multi_test"
46     "--skip=tests::copy::copy_randomized"
47     "--skip=tests::copy::copy_test"
48   ];
50   meta = with lib; {
51     description = "Command-line copy/paste utilities for Wayland, written in Rust";
52     homepage = "https://github.com/YaLTeR/wl-clipboard-rs";
53     changelog = "https://github.com/YaLTeR/wl-clipboard-rs/blob/v${version}/CHANGELOG.md";
54     platforms = platforms.linux;
55     license = with licenses; [ asl20 mit ];
56     mainProgram = "wl-clip";
57     maintainers = with maintainers; [ thiagokokada donovanglover ];
58   };