You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.9 KiB
76 lines
1.9 KiB
2 years ago
|
{ lib, python3, fetchFromGitHub, file, gnupg, gawk, notmuch, procps, withManpage ? false
|
||
3 years ago
|
}:
|
||
6 years ago
|
|
||
2 years ago
|
with python3.pkgs;
|
||
|
|
||
|
let
|
||
|
notmuch2 = callPackage ./notmuch.nix {
|
||
|
inherit notmuch;
|
||
|
};
|
||
|
in buildPythonApplication rec {
|
||
6 years ago
|
pname = "alot";
|
||
3 years ago
|
version = "0.10";
|
||
6 years ago
|
outputs = [ "out" ] ++ lib.optional withManpage "man";
|
||
6 years ago
|
|
||
6 years ago
|
disabled = !isPy3k;
|
||
6 years ago
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "pazz";
|
||
6 years ago
|
repo = "alot";
|
||
5 years ago
|
rev = version;
|
||
3 years ago
|
sha256 = "sha256-1reAq8X9VwaaZDY5UfvcFzHDKd71J88CqJgH3+ANjis=";
|
||
6 years ago
|
};
|
||
|
|
||
4 years ago
|
postPatch = ''
|
||
|
substituteInPlace alot/settings/manager.py --replace /usr/share "$out/share"
|
||
|
'';
|
||
|
|
||
6 years ago
|
nativeBuildInputs = lib.optional withManpage sphinx;
|
||
|
|
||
6 years ago
|
propagatedBuildInputs = [
|
||
3 years ago
|
notmuch2
|
||
6 years ago
|
urwid
|
||
|
urwidtrees
|
||
|
twisted
|
||
|
python_magic
|
||
|
configobj
|
||
6 years ago
|
service-identity
|
||
6 years ago
|
file
|
||
6 years ago
|
gpgme
|
||
6 years ago
|
];
|
||
|
|
||
6 years ago
|
postBuild = lib.optionalString withManpage "make -C docs man";
|
||
|
|
||
3 years ago
|
checkInputs = [ gawk future mock gnupg procps pytestCheckHook ];
|
||
|
# some twisted tests need internet access
|
||
|
disabledTests = [
|
||
|
"test_env_set"
|
||
|
"test_no_spawn_no_stdin_attached"
|
||
|
];
|
||
6 years ago
|
|
||
5 years ago
|
postInstall = let
|
||
|
completionPython = python.withPackages (ps: [ ps.configobj ]);
|
||
|
in lib.optionalString withManpage ''
|
||
6 years ago
|
mkdir -p $out/man
|
||
|
cp -r docs/build/man $out/man
|
||
|
''
|
||
|
+ ''
|
||
6 years ago
|
mkdir -p $out/share/{applications,alot}
|
||
|
cp -r extra/themes $out/share/alot
|
||
6 years ago
|
|
||
5 years ago
|
substituteInPlace extra/completion/alot-completion.zsh \
|
||
|
--replace "python3" "${completionPython.interpreter}"
|
||
6 years ago
|
install -D extra/completion/alot-completion.zsh $out/share/zsh/site-functions/_alot
|
||
|
|
||
6 years ago
|
sed "s,/usr/bin,$out/bin,g" extra/alot.desktop > $out/share/applications/alot.desktop
|
||
6 years ago
|
'';
|
||
|
|
||
3 years ago
|
meta = with lib; {
|
||
4 years ago
|
homepage = "https://github.com/pazz/alot";
|
||
6 years ago
|
description = "Terminal MUA using notmuch mail";
|
||
3 years ago
|
license = licenses.gpl3Plus;
|
||
6 years ago
|
platforms = platforms.linux;
|
||
2 years ago
|
maintainers = with maintainers; [ milibopp ];
|
||
6 years ago
|
};
|
||
|
}
|