1{ stdenv, buildPythonPackage, fetchFromGitHub
2, isPy3k , dbacl, notmuch, chardet, subprocess32 }:
3
4buildPythonPackage rec {
5 pname = "afew";
6 version = "git-2017-02-08";
7 name = "${pname}-${version}";
8
9 src = fetchFromGitHub {
10 owner = "afewmail";
11 repo = "afew";
12 rev = "889a3b966835c4d16aa1f24bb89f12945b9b2a67";
13 sha256 = "01gwrx1m3ka13ps3vj04a3y8llli2j2vkd3gcggcvxdphhpysckm";
14 };
15
16 buildInputs = [ dbacl ];
17
18 propagatedBuildInputs = [
19 notmuch
20 chardet
21 ] ++ stdenv.lib.optional (!isPy3k) subprocess32;
22
23 doCheck = false;
24
25 preConfigure = ''
26 substituteInPlace afew/DBACL.py --replace "'dbacl'" "'${dbacl}/bin/dbacl'"
27 '';
28
29 postInstall = ''
30 wrapProgram $out/bin/afew \
31 --prefix LD_LIBRARY_PATH : ${notmuch}/lib
32 '';
33
34 meta = with stdenv.lib; {
35 homepage = https://github.com/teythoon/afew;
36 description = "An initial tagging script for notmuch mail";
37 maintainers = with maintainers; [ garbas ];
38 };
39}