nixpkgs/pkgs/applications/misc/clipcat/default.nix
Daniël de Kok 85f96822a0 treewide: fix cargoSha256/cargoHash
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in
which cargo vendor erroneously changed permissions of vendored
crates. This was fixed in Rust
1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all
cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are
potentially broken.

This change updates cargoSha256/cargoHash tree-wide.

Fixes #121994.
2021-05-08 00:36:37 -07:00

54 lines
1.3 KiB
Nix

{ lib, fetchFromGitHub, installShellFiles, rustPlatform, rustfmt, xorg
, pkg-config, llvmPackages, clang, protobuf, python3 }:
rustPlatform.buildRustPackage rec {
pname = "clipcat";
version = "0.5.0";
src = fetchFromGitHub {
owner = "xrelkd";
repo = pname;
rev = "v${version}";
sha256 = "0rxl3ksjinw07q3p2vjqg80k3c6wx2q7pzpf2344zyfb4gkqzx1c";
};
cargoSha256 = "1n4il3l59m2a6ca54vfaivzg25abf8s4w5kpd5q51p13624iz0kb";
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/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 completions/bash-completion/completions/*
installShellCompletion --fish completions/fish/completions/*
installShellCompletion --zsh completions/zsh/site-functions/*
'';
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 ];
};
}