Unverified Commit b66fe7cb authored by Mathew Polzin's avatar Mathew Polzin Committed by GitHub
Browse files

alot: v0.10 -> v0.11 (#339844)

parents 2ac40064 8822e628
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -5,12 +5,14 @@
, gnupg
, gawk
, procps
, notmuch
, withManpage ? false
}:

with python311.pkgs; buildPythonApplication rec {
  pname = "alot";
  version = "0.10";
  version = "0.11";
  pyproject = true;

  outputs = [
    "out"
@@ -23,16 +25,18 @@ with python311.pkgs; buildPythonApplication rec {
  src = fetchFromGitHub {
    owner = "pazz";
    repo = "alot";
    rev = version;
    sha256 = "sha256-1reAq8X9VwaaZDY5UfvcFzHDKd71J88CqJgH3+ANjis=";
    rev = "refs/tags/${version}";
    sha256 = "sha256-mXaRzl7260uxio/BQ36BCBxgKhl1r0Rc6PwFZA8qNqc=";
  };

  postPatch = ''
    substituteInPlace alot/settings/manager.py \
      --replace /usr/share "$out/share"
      --replace-fail /usr/share "$out/share"
  '';

  nativeBuildInputs = lib.optional withManpage sphinx;
  nativeBuildInputs = [
    setuptools-scm
  ] ++ lib.optional withManpage sphinx;

  propagatedBuildInputs = [
    configobj
@@ -53,6 +57,7 @@ with python311.pkgs; buildPythonApplication rec {
    mock
    procps
    pytestCheckHook
    notmuch
  ];

  postBuild = lib.optionalString withManpage [
@@ -80,7 +85,7 @@ with python311.pkgs; buildPythonApplication rec {
      cp -r extra/themes $out/share/alot

      substituteInPlace extra/completion/alot-completion.zsh \
        --replace "python3" "${completionPython.interpreter}"
        --replace-fail "python3" "${completionPython.interpreter}"
      install -D extra/completion/alot-completion.zsh $out/share/zsh/site-functions/_alot

      sed "s,/usr/bin,$out/bin,g" extra/alot.desktop > $out/share/applications/alot.desktop