aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-10 14:02:46 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-02-10 14:02:46 +0100
commit3b96c7ee3570583c298cf89c22934467da24aa0c (patch)
treec03439e7801d06bba496b809934a51f0fc2ff22a /default.nix
parente01535ee6ea3d756528aab1b4ca454a2002daf9c (diff)
downloadNix-3b96c7ee3570583c298cf89c22934467da24aa0c.tar.gz
Nix-3b96c7ee3570583c298cf89c22934467da24aa0c.tar.zst
Nix-3b96c7ee3570583c298cf89c22934467da24aa0c.zip
Add muttprint
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 40cac81..b36cfc8 100644
--- a/default.nix
+++ b/default.nix
@@ -281,6 +281,49 @@ let
281 buildInputs = [ ruby ]; 281 buildInputs = [ ruby ];
282 }); 282 });
283 283
284 mypkgs.muttprint = stdenv.mkDerivation rec {
285 name = "muttprint-${version}";
286 version = "0.73";
287 src = fetchurl {
288 url = "http://downloads.sf.net/muttprint/${name}.tar.gz";
289 sha256 = "1dny4niyibfgazwlzfcnb37jy6k140rs6baaj629z12rmahfdavw";
290 };
291 patches = [
292 ./patches/muttprint_0.73-4.diff.gz
293 ./patches/muttprint_regex.patch
294 ./patches/muttprint_two_edge.patch
295 ];
296 preConfigure = ''
297 aclocal
298 automake --add-missing --copy
299 autoconf
300 '';
301 preBuild = ''
302 cd pics
303 convert -flop BabyTuX.eps BabyTuX.eps
304 for i in BabyTuX_color.eps BabyTuX.eps Debian_color.eps \
305 Debian.eps Gentoo.eps Gentoo_color.eps ; do
306 convert $i $(basename $i .eps).png
307 done
308 convert penguin.eps penguin.jpg
309 cd ..
310 '';
311 postInstall = ''
312 perlFlags=
313 for i in $(IFS=:; echo $PERL5LIB); do
314 perlFlags="$perlFlags -I$i"
315 done
316
317 sed -i "$out/bin/muttprint" -e "s|^#\!\(.*[ /]perl.*\)$|#\!\1$perlFlags|"
318
319 wrapProgram $out/bin/muttprint \
320 --prefix PATH : ${lib.makeBinPath [ psutils dialog
321 (texlive.combine { inherit (texlive) scheme-basic utopia fancyvrb lastpage marvosym ucs cm-super; }) ]}
322 '';
323 buildInputs = [ makeWrapper automake autoconf imagemagick ghostscript perl ] ++
324 (with perlPackages; [ TimeDate FileWhich TextIconv ]);
325 };
326
284# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh 327# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
285# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks 328# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
286in 329in