python.pkgs.afew : move to separate expression

This commit is contained in:
wisut hantanong 2017-07-19 16:23:28 +07:00
parent 68bcf522c7
commit af02f13e25
2 changed files with 40 additions and 34 deletions

View file

@ -0,0 +1,39 @@
{ stdenv, buildPythonPackage, fetchFromGitHub
, isPy3k , dbacl, notmuch, chardet, subprocess32 }:
buildPythonPackage rec {
pname = "afew";
version = "git-2017-02-08";
name = "${pname}-${version}";
src = fetchFromGitHub {
owner = "afewmail";
repo = "afew";
rev = "889a3b966835c4d16aa1f24bb89f12945b9b2a67";
sha256 = "01gwrx1m3ka13ps3vj04a3y8llli2j2vkd3gcggcvxdphhpysckm";
};
buildInputs = [ dbacl ];
propagatedBuildInputs = [
notmuch
chardet
] ++ stdenv.lib.optional (!isPy3k) subprocess32;
doCheck = false;
preConfigure = ''
substituteInPlace afew/DBACL.py --replace "'dbacl'" "'${dbacl}/bin/dbacl'"
'';
postInstall = ''
wrapProgram $out/bin/afew \
--prefix LD_LIBRARY_PATH : ${notmuch}/lib
'';
meta = with stdenv.lib; {
homepage = https://github.com/teythoon/afew;
description = "An initial tagging script for notmuch mail";
maintainers = with maintainers; [ garbas ];
};
}

View file

@ -276,40 +276,7 @@ in {
adal = callPackage ../development/python-modules/adal { };
afew = buildPythonPackage rec {
name = "afew-git-2017-02-08";
src = pkgs.fetchFromGitHub {
owner = "afewmail";
repo = "afew";
rev = "889a3b966835c4d16aa1f24bb89f12945b9b2a67";
sha256 = "01gwrx1m3ka13ps3vj04a3y8llli2j2vkd3gcggcvxdphhpysckm";
};
buildInputs = with self; [ pkgs.dbacl ];
propagatedBuildInputs = with self; [
self.notmuch
self.chardet
] ++ optional (!isPy3k) self.subprocess32;
doCheck = false;
preConfigure = ''
substituteInPlace afew/DBACL.py --replace "'dbacl'" "'${pkgs.dbacl}/bin/dbacl'"
'';
postInstall = ''
wrapProgram $out/bin/afew \
--prefix LD_LIBRARY_PATH : ${pkgs.notmuch}/lib
'';
meta = {
homepage = https://github.com/teythoon/afew;
description = "An initial tagging script for notmuch mail";
maintainers = with maintainers; [ garbas ];
};
};
afew = callPackage ../development/python-modules/afew { };
aiodns = buildPythonPackage rec {
name = "aiodns-${version}";