Unverified Commit 4f9bedb8 authored by Naïm Favier's avatar Naïm Favier Committed by GitHub
Browse files

Merge pull request #215330 from soywod/master

himalaya: 0.6.0 -> 0.7.1
parents 6c79e120 69978dcb
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -14178,6 +14178,16 @@
    githubId = 6277322;
    name = "Wei Tang";
  };
  soywod = {
    name = "Clément DOUIN";
    email = "clement.douin@posteo.net";
    matrix = "@soywod:matrix.org";
    github = "soywod";
    githubId = 10437171;
    keys = [{
      fingerprint = "75F0 AB7C FE01 D077 AEE6  CAFD 353E 4A18 EE0F AB72";
    }];
  };
  spacefrogg = {
    email = "spacefrogg-nixos@meterriblecrew.net";
    github = "spacefrogg";
+8 −6
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
, buildGoModule
, buildVimPluginFrom2Nix
, fetchFromGitHub
, fetchFromSourcehut
, fetchpatch
, fetchurl
, substituteAll
@@ -496,12 +497,13 @@ self: super: {
  });

  himalaya-vim = super.himalaya-vim.overrideAttrs (old: {
    postPatch = ''
      substituteInPlace plugin/himalaya.vim \
        --replace "if !executable('himalaya')" "if v:false"
      substituteInPlace autoload/himalaya/request.vim \
        --replace "'himalaya" "'${himalaya}/bin/himalaya"
    '';
    buildInputs = [ himalaya ];
    src = fetchFromSourcehut {
      owner = "~soywod";
      repo = "himalaya-vim";
      rev = "v${himalaya.version}";
      sha256 = "W+91hnNeS6WkDiR9r1s7xPTK9JlCWiVkI/nXVYbepY0=";
    };
  });

  jedi-vim = super.jedi-vim.overrideAttrs (old: {
+27 −20
Original line number Diff line number Diff line
@@ -2,44 +2,51 @@
, rustPlatform
, fetchFromGitHub
, stdenv
, enableCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
, installShellFiles
, installShellCompletions ? stdenv.hostPlatform == stdenv.buildPlatform
, installManPages ? stdenv.hostPlatform == stdenv.buildPlatform
, pkg-config
, Security
, libiconv
, openssl
, notmuch
, withImapBackend ? true
, withNotmuchBackend ? false
, withSmtpSender ? true
}:

rustPlatform.buildRustPackage rec {
  pname = "himalaya";
  version = "0.6.0";
  version = "0.7.1";

  src = fetchFromGitHub {
    owner = "soywod";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-d+ERCUPUHx41HfBtjb6BjhGKzkUTGIb01BRWvAnLYwk=";
    sha256 = "sha256-yAfNH9LSXlS/Hzi5kAuur5BX2vITMucprDzxhlV8RiY=";
  };

  cargoSha256 = "sha256-ICaahkIP1uSm4iXvSPMo8uVTtSa1nCyJdDihGdVEQvg=";
  cargoSha256 = "sha256-FXfh6T8dNsnD/V/wYSMDWs+ll0d1jg1Dc3cQT39b0ws=";

  nativeBuildInputs = lib.optionals enableCompletions [ installShellFiles ]
    ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ pkg-config ];
  nativeBuildInputs = [ ]
    ++ lib.optional (installManPages || installShellCompletions) installShellFiles
    ++ lib.optional (!stdenv.hostPlatform.isDarwin) pkg-config;

  buildInputs =
    if stdenv.hostPlatform.isDarwin then [
      Security
      libiconv
    ] else [
      openssl
    ];
  buildInputs = [ ]
    ++ (if stdenv.hostPlatform.isDarwin then [ Security libiconv ] else [ openssl ])
    ++ lib.optional withNotmuchBackend notmuch;

  # flag added because without end-to-end testing is ran which requires
  # additional tooling and servers to test
  cargoTestFlags = [ "--lib" ];
  buildNoDefaultFeatures = true;
  buildFeatures = [ ]
    ++ lib.optional withImapBackend "imap-backend"
    ++ lib.optional withNotmuchBackend "notmuch-backend"
    ++ lib.optional withSmtpSender "smtp-sender";

  postInstall = lib.optionalString enableCompletions ''
    # Install shell function
  postInstall = lib.optionalString installManPages ''
    mkdir -p $out/man
    $out/bin/himalaya man $out/man
    installManPage $out/man/*
  '' + lib.optionalString installShellCompletions ''
    installShellCompletion --cmd himalaya \
      --bash <($out/bin/himalaya completion bash) \
      --fish <($out/bin/himalaya completion fish) \
@@ -50,7 +57,7 @@ rustPlatform.buildRustPackage rec {
    description = "Command-line interface for email management";
    homepage = "https://github.com/soywod/himalaya";
    changelog = "https://github.com/soywod/himalaya/blob/v${version}/CHANGELOG.md";
    license = licenses.bsdOriginal;
    maintainers = with maintainers; [ toastal yanganto ];
    license = licenses.mit;
    maintainers = with maintainers; [ soywod toastal yanganto ];
  };
}