Merge pull request #269895 from xrelkd/update/clipcat

clipcat: 0.5.1 -> 0.6.2
This commit is contained in:
Mario Rodas 2023-11-26 02:01:28 -05:00 committed by GitHub
commit d588537b90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 2563 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,57 +1,50 @@
{ lib
, fetchFromGitHub
, installShellFiles
, rustPlatform
, rustfmt
, xorg
, pkg-config
, protobuf
, python3
, xvfb-run
, installShellFiles
}:
rustPlatform.buildRustPackage rec {
pname = "clipcat";
version = "0.5.1";
version = "0.6.2";
src = fetchFromGitHub {
owner = "xrelkd";
repo = pname;
rev = "v${version}";
sha256 = "sha256-dV17xP6xG6Nyi6m0CdH8Mk4Y0giDtsv/QiM23jF58q0=";
sha256 = "sha256-sofP+zyyakB4w1R3wS/FNDTOWwNeDJyB5CBtR3yZsmE=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"x11-clipboard-0.6.0" = "sha256-dKx2kda5JC79juksP2qiO9yfeFCWymcYhGPSygQ0mrg=";
};
};
# needed for internal protobuf c wrapper library
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
cargoHash = "sha256-aOXAjxmk5uqBOw/l1CW/LbeBucr7p4iudbVY6d7yEjg=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
rustfmt
protobuf
python3
installShellFiles
];
buildInputs = [ xorg.libxcb ];
nativeCheckInputs = [
xvfb-run
];
buildFeatures = [ "all" ];
useNextest = true;
# cargo-nextest help us retry the failed test cases
NEXTEST_RETRIES = 5;
# Some test cases need to interactive with X11, we use xvfb-run here
checkPhase = ''
xvfb-run --auto-servernum cargo nextest run --release --workspace --no-fail-fast --no-capture
'';
postInstall = ''
installShellCompletion --bash completions/bash-completion/completions/*
installShellCompletion --fish completions/fish/completions/*
installShellCompletion --zsh completions/zsh/site-functions/*
for cmd in clipcatd clipcatctl clipcat-menu clipcat-notify; do
installShellCompletion --cmd $cmd \
--bash <($out/bin/$cmd completions bash) \
--fish <($out/bin/$cmd completions fish) \
--zsh <($out/bin/$cmd completions zsh)
done
'';
meta = with lib; {