diff options
Diffstat (limited to 'pkgs/by-name/cl/clipcat')
-rw-r--r-- | pkgs/by-name/cl/clipcat/package.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/by-name/cl/clipcat/package.nix b/pkgs/by-name/cl/clipcat/package.nix new file mode 100644 index 0000000000000..dcfac92149634 --- /dev/null +++ b/pkgs/by-name/cl/clipcat/package.nix @@ -0,0 +1,49 @@ +{ lib +, fetchFromGitHub +, rustPlatform +, protobuf +, installShellFiles +}: + +rustPlatform.buildRustPackage rec { + pname = "clipcat"; + version = "0.16.3"; + + src = fetchFromGitHub { + owner = "xrelkd"; + repo = pname; + rev = "v${version}"; + hash = "sha256-571qS6pgXyt8GNVFMGFU3bKgOFDG/k4K53LK+UJgPKc="; + }; + + cargoHash = "sha256-Ey7GOKtHLlljzyiEtoCH7zrKo4s4kJivHDPB7x0C3k0="; + + nativeBuildInputs = [ + protobuf + installShellFiles + ]; + + checkFlags = [ + # Some test cases interact with X11, skip them + "--skip=test_x11_clipboard" + "--skip=test_x11_primary" + ]; + + postInstall = '' + 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; { + description = "Clipboard Manager written in Rust Programming Language"; + homepage = "https://github.com/xrelkd/clipcat"; + license = licenses.gpl3Only; + platforms = platforms.linux; + maintainers = with maintainers; [ xrelkd ]; + mainProgram = "clipcatd"; + }; +} |