btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / ke / kestrel / package.nix
blob26045accca449a07908064693e07c44224c17aee
1 { lib
2 , fetchFromGitHub
3 , rustPlatform
4 , installShellFiles
5 }:
7 rustPlatform.buildRustPackage rec {
8   pname = "kestrel";
9   version = "1.0.2";
11   src = fetchFromGitHub {
12     owner = "finfet";
13     repo = pname;
14     rev = "v${version}";
15     hash = "sha256-bKQBOk9yUqgnufRyyqXatsRHpesbM49rAkz0dD5XE80=";
16   };
18   cargoHash = "sha256-R5TRF4yvjQalsj1UA2kiLBuTOhqIbbHW6lvf1ixvJG4=";
20   nativeBuildInputs = [
21     installShellFiles
22   ];
24   postInstall = ''
25     installManPage docs/man/kestrel.1
26     installShellCompletion --bash --name ${pname} completion/kestrel.bash-completion
27   '';
29   meta = with lib; {
30     description = "File encryption done right";
31     mainProgram = "kestrel";
32     longDescription = "
33       Kestrel is a data-at-rest file encryption program
34       that lets you encrypt files to anyone with a public key.
35     ";
36     homepage = "https://getkestrel.com";
37     license = licenses.bsd3;
38     maintainers = with maintainers; [ zendo ];
39   };