2024-01-11 12:27:33 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, wayland
|
|
|
|
, withNativeLibs ? false
|
|
|
|
}:
|
|
|
|
|
2024-03-16 14:56:24 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2024-01-11 12:27:33 +00:00
|
|
|
pname = "wl-clipboard-rs";
|
2024-03-16 14:56:24 +00:00
|
|
|
version = "0.8.1";
|
2024-01-11 12:27:33 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "YaLTeR";
|
|
|
|
repo = "wl-clipboard-rs";
|
2024-03-16 14:56:24 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-tNmpGBg21IuhKEzY15O2MKVpMB+eCjvRVwVUahADuJU=";
|
2024-01-11 12:27:33 +00:00
|
|
|
};
|
|
|
|
|
2024-03-16 14:56:24 +00:00
|
|
|
cargoHash = "sha256-0Ix+fF1QO1KU8FIOb8EV4iYXe4S69sZOxCdxYccL8m0=";
|
2024-01-11 12:27:33 +00:00
|
|
|
|
|
|
|
cargoBuildFlags = [
|
|
|
|
"--package=wl-clipboard-rs"
|
|
|
|
"--package=wl-clipboard-rs-tools"
|
|
|
|
] ++ lib.optionals withNativeLibs [
|
|
|
|
"--features=native_lib"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals withNativeLibs [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals withNativeLibs [
|
|
|
|
wayland
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export XDG_RUNTIME_DIR=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Assertion errors
|
|
|
|
checkFlags = [
|
|
|
|
"--skip=tests::copy::copy_large"
|
|
|
|
"--skip=tests::copy::copy_multi_no_additional_text_mime_types_test"
|
|
|
|
"--skip=tests::copy::copy_multi_test"
|
|
|
|
"--skip=tests::copy::copy_randomized"
|
|
|
|
"--skip=tests::copy::copy_test"
|
|
|
|
];
|
|
|
|
|
2024-03-16 14:56:24 +00:00
|
|
|
meta = with lib; {
|
2024-01-11 12:27:33 +00:00
|
|
|
description = "Command-line copy/paste utilities for Wayland, written in Rust";
|
|
|
|
homepage = "https://github.com/YaLTeR/wl-clipboard-rs";
|
2024-03-16 14:56:24 +00:00
|
|
|
changelog = "https://github.com/YaLTeR/wl-clipboard-rs/blob/v${version}/CHANGELOG.md";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = with licenses; [ asl20 mit ];
|
2024-01-11 12:27:33 +00:00
|
|
|
mainProgram = "wl-clip";
|
2024-03-16 14:56:59 +00:00
|
|
|
maintainers = with maintainers; [ thiagokokada donovanglover ];
|
2024-01-11 12:27:33 +00:00
|
|
|
};
|
|
|
|
}
|