about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-10-28 23:00:38 -0500
committerGitHub <noreply@github.com>2020-10-28 23:00:38 -0500
commit8305cce21076ad95c9cd8af42f94a2f774279103 (patch)
treed9563e8ade75e93d347845c4ca40a10a924b7256 /pkgs/applications/misc
parent13213174fc2ec55b1e893267e0a4723d0bf5de33 (diff)
parent7ee6eb7e1d81951d8fa8fda23a7d3e097b845de1 (diff)
Merge pull request #100638 from xrelkd/add/clipcat
clipcat: init at 0.4.19
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/clipcat/default.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/applications/misc/clipcat/default.nix b/pkgs/applications/misc/clipcat/default.nix
new file mode 100644
index 0000000000000..244770e138f91
--- /dev/null
+++ b/pkgs/applications/misc/clipcat/default.nix
@@ -0,0 +1,64 @@
+{ lib, fetchFromGitHub, installShellFiles, rustPlatform, rustfmt, xorg
+, pkgconfig, llvmPackages, clang, protobuf, python3 }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "clipcat";
+  version = "0.4.19";
+
+  src = fetchFromGitHub {
+    owner = "xrelkd";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1lhnm521qqy3aw2iyk1dv4yc5ms0c5x5iipx96bz6v6y0cnmf4kw";
+  };
+
+  cargoSha256 = "04iflyvz8g53z658rkxafiyi2m9kzxwl3p1xgkjq7vacmz5jk15c";
+
+  LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
+
+  # needed for internal protobuf c wrapper library
+  PROTOC = "${protobuf}/bin/protoc";
+  PROTOC_INCLUDE = "${protobuf}/include";
+
+  nativeBuildInputs = [
+    pkgconfig
+
+    clang
+    llvmPackages.libclang
+
+    rustfmt
+    protobuf
+
+    python3
+
+    installShellFiles
+  ];
+  buildInputs = [ xorg.libxcb ];
+
+  cargoBuildFlags = [ "--features=all" ];
+
+  postInstall = ''
+    installShellCompletion --bash --name clipcatd             completions/bash-completion/completions/clipcatd
+    installShellCompletion --fish --name clipcatd.fish        completions/fish/completions/clipcatd.fish
+    installShellCompletion --zsh  --name _clipcatd            completions/zsh/site-functions/_clipcatd
+
+    installShellCompletion --bash --name clipcatctl           completions/bash-completion/completions/clipcatctl
+    installShellCompletion --fish --name clipcatctl.fish      completions/fish/completions/clipcatctl.fish
+    installShellCompletion --zsh  --name _clipcatctl          completions/zsh/site-functions/_clipcatctl
+
+    installShellCompletion --bash --name clipcat-menu         completions/bash-completion/completions/clipcat-menu
+    installShellCompletion --fish --name clipcat-menu.fish    completions/fish/completions/clipcat-menu.fish
+    installShellCompletion --zsh  --name _clipcat-menu        completions/zsh/site-functions/_clipcat-menu
+
+    installShellCompletion --bash --name clipcat-notify       completions/bash-completion/completions/clipcat-notify
+    installShellCompletion --fish --name clipcat-notify.fish  completions/fish/completions/clipcat-notify.fish
+    installShellCompletion --zsh  --name _clipcat-notify      completions/zsh/site-functions/_clipcat-notify
+  '';
+
+  meta = with lib; {
+    description = "Clipboard Manager written in Rust Programming Language";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ xrelkd ];
+  };
+}