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.

59 lines
1.5 KiB
Nix
Raw Normal View History

2024-10-22 10:46:46 +00:00
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
protobuf,
installShellFiles,
darwin,
}:
2020-10-15 19:49:26 +00:00
rustPlatform.buildRustPackage rec {
pname = "clipcat";
2024-10-26 07:25:04 +00:00
version = "0.19.0";
2020-10-15 19:49:26 +00:00
src = fetchFromGitHub {
owner = "xrelkd";
2024-10-22 10:47:37 +00:00
repo = "clipcat";
rev = "refs/tags/v${version}";
2024-10-26 07:25:04 +00:00
hash = "sha256-94xw/E1Jp+bctVNzRZDdVaxxSMF/R87DNlRAzRT3Uvg=";
};
2020-10-15 19:49:26 +00:00
2024-10-26 07:25:04 +00:00
cargoHash = "sha256-qDcUEJSBd8c/ept/Y+GQCrp5b7xkSdX6ktdO9/c3k8o=";
2024-04-21 09:56:57 +00:00
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Cocoa
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
2020-10-15 19:49:26 +00:00
nativeBuildInputs = [
protobuf
installShellFiles
];
checkFlags = [
# Some test cases interact with X11, skip them
"--skip=test_x11_clipboard"
"--skip=test_x11_primary"
2023-11-25 09:34:17 +00:00
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
2023-11-25 09:34:17 +00: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 19:49:26 +00:00
'';
2024-10-22 10:47:37 +00:00
meta = {
2020-10-15 19:49:26 +00:00
description = "Clipboard Manager written in Rust Programming Language";
2021-02-08 13:14:19 +00:00
homepage = "https://github.com/xrelkd/clipcat";
2024-10-22 10:47:37 +00:00
license = lib.licenses.gpl3Only;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [ xrelkd bot-wxt1221 ];
mainProgram = "clipcatd";
2020-10-15 19:49:26 +00:00
};
}