.github/labeler-no-sync: fix backport labelling (#378567)
[NixPkgs.git] / pkgs / by-name / ne / neverest / package.nix
blob8a54783f91f62d6b65ab7b7ab7f38a79096c8305
2   lib,
3   rustPlatform,
4   fetchFromGitHub,
5   stdenv,
6   pkg-config,
7   darwin,
8   installShellFiles,
9   installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
10   installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform,
11   notmuch,
12   buildNoDefaultFeatures ? false,
13   buildFeatures ? [ ],
16 rustPlatform.buildRustPackage rec {
17   # Learn more about available cargo features at:
18   #  - <https://pimalaya.org/neverest/cli/latest/installation.html#cargo>
19   #  - <https://git.sr.ht/~soywod/neverest-cli/tree/master/item/Cargo.toml#L18>
20   inherit buildNoDefaultFeatures buildFeatures;
22   pname = "neverest";
23   version = "1.0.0-beta";
25   src = fetchFromGitHub {
26     owner = "pimalaya";
27     repo = "neverest";
28     rev = "v${version}";
29     hash = "sha256-3PSJyhxrOCiuHUeVHO77+NecnI5fN5EZfPhYizuYvtE=";
30   };
32   useFetchCargoVendor = true;
33   cargoHash = "sha256-K+LKRokfE8i4Huti0aQm4UrpConTcxVwJ2DyeOLjNKA=";
35   nativeBuildInputs = [
36     pkg-config
37   ] ++ lib.optional (installManPages || installShellCompletions) installShellFiles;
39   buildInputs =
40     [ ]
41     ++ lib.optionals stdenv.hostPlatform.isDarwin (
42       with darwin.apple_sdk.frameworks;
43       [
44         AppKit
45         Cocoa
46         Security
47       ]
48     )
49     ++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch;
51   # TODO: unit tests temporarily broken, remove this line for the next
52   # beta.2 release
53   doCheck = false;
55   postInstall =
56     lib.optionalString installManPages ''
57       mkdir -p $out/man
58       $out/bin/neverest man $out/man
59       installManPage $out/man/*
60     ''
61     + lib.optionalString installShellCompletions ''
62       installShellCompletion --cmd neverest \
63         --bash <($out/bin/neverest completion bash) \
64         --fish <($out/bin/neverest completion fish) \
65         --zsh <($out/bin/neverest completion zsh)
66     '';
68   meta = with lib; {
69     description = "CLI to synchronize, backup and restore emails";
70     mainProgram = "neverest";
71     homepage = "https://pimalaya.org/neverest/cli/v${version}/";
72     changelog = "https://git.sr.ht/~soywod/neverest-cli/tree/v${version}/item/CHANGELOG.md";
73     license = licenses.mit;
74     maintainers = with maintainers; [ soywod ];
75   };