nixpkgs/pkgs/by-name/cl/clipcat/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, fetchFromGitHub
, rustPlatform
, protobuf
2023-11-25 10:34:17 +01:00
, installShellFiles
}:
2020-10-15 21:49:26 +02:00
rustPlatform.buildRustPackage rec {
pname = "clipcat";
2024-01-25 14:56:32 +01:00
version = "0.16.4";
2020-10-15 21:49:26 +02:00
src = fetchFromGitHub {
owner = "xrelkd";
repo = pname;
rev = "v${version}";
2024-01-25 14:56:32 +01:00
hash = "sha256-gYg1czSwUm1zJUkw5SMk6C4yDfHcwjWnnHJftDLNvfs=";
};
2020-10-15 21:49:26 +02:00
2024-01-25 14:56:32 +01:00
cargoHash = "sha256-e32DGV7/ueT25Lx318aGZEHRnUGxCn0J5/K3dgT02Ug=";
2020-10-15 21:49:26 +02:00
nativeBuildInputs = [
protobuf
installShellFiles
];
checkFlags = [
# Some test cases interact with X11, skip them
"--skip=test_x11_clipboard"
"--skip=test_x11_primary"
2023-11-25 10:34:17 +01:00
];
2020-10-15 21:49:26 +02:00
postInstall = ''
2023-11-25 10:34:17 +01:00
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
2020-10-15 21:49:26 +02:00
'';
meta = with lib; {
description = "Clipboard Manager written in Rust Programming Language";
2021-02-08 14:14:19 +01:00
homepage = "https://github.com/xrelkd/clipcat";
license = licenses.gpl3Only;
2020-10-15 21:49:26 +02:00
platforms = platforms.linux;
maintainers = with maintainers; [ xrelkd ];
mainProgram = "clipcatd";
2020-10-15 21:49:26 +02:00
};
}