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

54 lines
1.3 KiB
Nix
Raw Normal View History

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