1 { stdenv, fetchurl, lib, psutils, dialog, texlive, makeWrapper, automake, autoconf, imagemagick, ghostscript, perl, perlPackages }:
2 stdenv.mkDerivation rec {
3 name = "muttprint-${version}";
6 url = "http://downloads.sf.net/muttprint/${name}.tar.gz";
7 sha256 = "1dny4niyibfgazwlzfcnb37jy6k140rs6baaj629z12rmahfdavw";
16 automake --add-missing --copy
21 convert -flop BabyTuX.eps BabyTuX.eps
22 for i in BabyTuX_color.eps BabyTuX.eps Debian_color.eps \
23 Debian.eps Gentoo.eps Gentoo_color.eps ; do
24 convert $i $(basename $i .eps).png
26 convert penguin.eps penguin.jpg
31 for i in $(IFS=:; echo $PERL5LIB); do
32 perlFlags="$perlFlags -I$i"
35 sed -i "$out/bin/muttprint" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|"
36 sed -i "$out/bin/muttprint" -e "s|ENV{HOME}/.muttprintrc|ENV{XDG_CONFIG_HOME}/muttprint/muttprintrc|"
38 wrapProgram $out/bin/muttprint \
39 --prefix PATH : ${lib.makeBinPath [ psutils dialog
40 (texlive.combine { inherit (texlive) scheme-basic utopia fancyvrb lastpage marvosym ucs cm-super; }) ]}
42 buildInputs = [ makeWrapper automake autoconf imagemagick ghostscript perl ] ++
43 (with perlPackages; [ TimeDate FileWhich TextIconv ]);