@ -1,17 +1,22 @@
{ stdenv , buildPythonPackage , fetchFromGitHub , isPy3k
, notmuch , urwid , urwidtrees , twisted , python_magic , configobj , pygpgme , mock , file , gpgme } :
{ stdenv , lib , buildPythonPackage , fetchFromGitHub , isPy3k
, notmuch , urwid , urwidtrees , twisted , python_magic , configobj , pygpgme , mock , file , gpgme
, service-identity , gpg
, gnupg ? null , sphinx , awk ? null , procps ? null , future ? null
, withManpage ? false } :
buildPythonPackage rec {
version = " 0 . 5 . 1 " ;
pname = " a l o t " ;
version = " 0 . 7 " ;
outputs = [ " o u t " ] ++ lib . optional withManpage " m a n " ;
disabled = isPy3k ;
src = fetchFromGitHub {
owner = " p a z z " ;
repo = pname ;
rev = " v e r s i o n " ;
sha256 = " 0 i p k h c 5 w l l f q 7 8 l g 4 7 a i q 4 q i h 0 y j q 8 a d 9 x k r b g c 8 8 x k 8 p k 9 1 6 6 i 8 " ;
repo = " a l o t " ;
rev = " ${ version } " ;
sha256 = " 1 y 9 3 2 s m n g 7 q x 7 y b m q w 4 q h 7 5 b 0 l v 9 i m f s 5 a k 9 f d 0 q h y s i j 8 k p m d h i " ;
} ;
postPatch = ''
@ -20,6 +25,8 @@ buildPythonPackage rec {
" t h e m e s _ d i r = s t r i n g ( d e f a u l t = ' $ o u t / s h a r e / t h e m e s ' ) "
'' ;
nativeBuildInputs = lib . optional withManpage sphinx ;
propagatedBuildInputs = [
notmuch
urwid
@ -27,21 +34,32 @@ buildPythonPackage rec {
twisted
python_magic
configobj
pygpgme
mock
service-identity
file
gpg
] ;
postInstall = ''
mkdir - p $ out/share
# some twisted tests need the network (test_env_set... )
doCheck = false ;
postBuild = lib . optionalString withManpage " m a k e - C d o c s m a n " ;
checkInputs = [ awk future mock gnupg procps ] ;
postInstall = lib . optionalString withManpage ''
mkdir - p $ out/man
cp - r docs/build/man $ out/man
''
+ ''
mkdir - p $ out/share/applications
cp - r extra/themes $ out/share
wrapProgram $ out/bin/alot \
- - prefix LD_LIBRARY_PATH : ' $ { stdenv . lib . makeLibraryPath [ notmuch file gpgme ] } '
sed " s , / u s r / b i n , $ o u t / b i n , g " extra/alot.desktop > $ out/share/applications/alot.desktop
'' ;
meta = with stdenv . lib ; {
homepage = https://github.com/pazz/alot ;
description = " T e r m i n a l M U A u s i n g n o t m u c h m a i l " ;
license = licenses . gpl3 ;
platforms = platforms . linux ;
maintainers = with maintainers ; [ garbas ] ;
} ;