chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / hi / himalaya / package.nix
blob027254e2423a28f9586f1149e26cb3b901eb74bb
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , stdenv
5 , pkg-config
6 , darwin
7 , installShellFiles
8 , installShellCompletions ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
9 , installManPages ? stdenv.buildPlatform.canExecute stdenv.hostPlatform
10 , notmuch
11 , gpgme
12 , buildNoDefaultFeatures ? false
13 , buildFeatures ? []
16 rustPlatform.buildRustPackage rec {
17   # Learn more about available cargo features at:
18   #  - <https://pimalaya.org/himalaya/cli/latest/installation.html#cargo>
19   inherit buildNoDefaultFeatures buildFeatures;
21   pname = "himalaya";
22   version = "1.0.0-beta.4";
24   src = fetchFromGitHub {
25     owner = "soywod";
26     repo = pname;
27     rev = "v${version}";
28     hash = "sha256-NrWBg0sjaz/uLsNs8/T4MkUgHOUvAWRix1O5usKsw6o=";
29   };
31   cargoHash = "sha256-YS8IamapvmdrOPptQh2Ef9Yold0IK1XIeGs0kDIQ5b8=";
33   NIX_LDFLAGS = lib.optionals stdenv.hostPlatform.isDarwin [
34     "-F${darwin.apple_sdk.frameworks.AppKit}/Library/Frameworks"
35     "-framework"
36     "AppKit"
37   ];
39   nativeBuildInputs = [ pkg-config ]
40     ++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) pkg-config
41     ++ lib.optional (installManPages || installShellCompletions) installShellFiles;
43   buildInputs = [ ]
44     ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa Security ])
45     ++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch
46     ++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) gpgme;
48   postInstall = lib.optionalString installManPages ''
49     mkdir -p $out/man
50     $out/bin/himalaya man $out/man
51     installManPage $out/man/*
52   '' + lib.optionalString installShellCompletions ''
53     installShellCompletion --cmd himalaya \
54       --bash <($out/bin/himalaya completion bash) \
55       --fish <($out/bin/himalaya completion fish) \
56       --zsh <($out/bin/himalaya completion zsh)
57   '';
59   meta = with lib; {
60     description = "CLI to manage emails";
61     mainProgram = "himalaya";
62     homepage = "https://pimalaya.org/himalaya/cli/latest/";
63     changelog = "https://github.com/soywod/himalaya/blob/v${version}/CHANGELOG.md";
64     license = licenses.mit;
65     maintainers = with maintainers; [ soywod toastal yanganto ];
66   };