nixpkgs/pkgs/applications/misc/clipcat/default.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

2020-10-15 19:49:26 +00:00
{ lib, fetchFromGitHub, installShellFiles, rustPlatform, rustfmt, xorg
, pkg-config, llvmPackages, clang, protobuf, python3 }:
2020-10-15 19:49:26 +00:00
rustPlatform.buildRustPackage rec {
pname = "clipcat";
2021-02-08 13:14:19 +00:00
version = "0.5.0";
2020-10-15 19:49:26 +00:00
src = fetchFromGitHub {
owner = "xrelkd";
repo = pname;
rev = "v${version}";
2021-02-08 13:14:19 +00:00
sha256 = "0rxl3ksjinw07q3p2vjqg80k3c6wx2q7pzpf2344zyfb4gkqzx1c";
2020-10-15 19:49:26 +00:00
};
cargoSha256 = "1n4il3l59m2a6ca54vfaivzg25abf8s4w5kpd5q51p13624iz0kb";
2020-10-15 19:49:26 +00:00
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
2020-10-15 19:49:26 +00:00
# needed for internal protobuf c wrapper library
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
nativeBuildInputs = [
pkg-config
2020-10-15 19:49:26 +00:00
clang
llvmPackages.libclang
rustfmt
protobuf
python3
installShellFiles
];
buildInputs = [ xorg.libxcb ];
2021-11-15 23:48:05 +00:00
buildFeatures = [ "all" ];
2020-10-15 19:49:26 +00:00
postInstall = ''
2021-02-08 13:14:19 +00:00
installShellCompletion --bash completions/bash-completion/completions/*
installShellCompletion --fish completions/fish/completions/*
installShellCompletion --zsh completions/zsh/site-functions/*
2020-10-15 19:49:26 +00:00
'';
meta = with lib; {
description = "Clipboard Manager written in Rust Programming Language";
2021-02-08 13:14:19 +00:00
homepage = "https://github.com/xrelkd/clipcat";
license = licenses.gpl3Only;
2020-10-15 19:49:26 +00:00
platforms = platforms.linux;
maintainers = with maintainers; [ xrelkd ];
};
}