blob: 80e4982fc8a0ad34ad990e751886f8bd1eba374e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
{ lib, fetchFromGitHub, installShellFiles, rustPlatform, rustfmt, xorg
, pkg-config, 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 = [
pkg-config
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 ];
};
}
|