lol
1{ fetchurl, stdenv, python2, makeWrapper, lib
2, libGLU_combined, SDL, freeglut, ghostscript, pdftk, dejavu_fonts }:
3
4let
5 version = "0.12.0";
6 pythonEnv = python2.withPackages (ps: with ps; [pyopengl pygame pillow]);
7in stdenv.mkDerivation {
8 # This project was formerly known as KeyJNote.
9 # See http://keyj.emphy.de/apple-lawsuit/ for details.
10
11 name = "impressive-${version}";
12
13 src = fetchurl {
14 url = "mirror://sourceforge/impressive/Impressive-${version}.tar.gz";
15 sha256 = "0zaqq3yvd296mfr5bxpj2hqlk7vrb0rsbgd4dc1l5ag46giqvivx";
16 };
17
18 buildInputs = [ makeWrapper pythonEnv ];
19
20 configurePhase = ''
21 # Let's fail at build time if the library we're substituting in doesn't
22 # exist/isn't marked as executable
23 test -x ${SDL}/lib/libSDL.so
24 sed -i "impressive.py" \
25 -e '/^__website__/a SDL_LIBRARY = "${SDL}/lib/libSDL.so"' \
26 -e 's/sdl = CDLL.*/sdl = CDLL(SDL_LIBRARY)/' \
27 -e 's^FontPath =.*/usr/.*$^FontPath = ["${dejavu_fonts}/share/fonts", ""]^'
28 '';
29
30 installPhase = ''
31 mkdir -p "$out/bin" "$out/share/doc/impressive" "$out/share/man/man1"
32 mv impressive.py "$out/bin/impressive"
33 mv impressive.1 "$out/share/man/man1"
34 mv changelog.txt impressive.html license.txt "$out/share/doc/impressive"
35
36 wrapProgram "$out/bin/impressive" \
37 --prefix PATH ":" "${ghostscript}/bin:${pdftk}/bin"
38 '';
39
40 meta = {
41 description = "Impressive, an effect-rich presentation tool for PDFs";
42
43 longDescription = ''
44 Impressive is a program that displays presentation slides.
45 But unlike OpenOffice.org Impress or other similar
46 applications, it does so with style. Smooth alpha-blended
47 slide transitions are provided for the sake of eye candy, but
48 in addition to this, Impressive offers some unique tools that
49 are really useful for presentations. Read below if you want
50 to know more about these features.
51
52 Creating presentations for Impressive is very simple: You just
53 need to export a PDF file from your presentation software.
54 This means that you can create slides in the application of
55 your choice and use Impressive for displaying them. If your
56 application does not support PDF output, you can alternatively
57 use a set of pre-rendered image files – or you use Impressive
58 to make a slideshow with your favorite photos.
59 '';
60
61 homepage = http://impressive.sourceforge.net/;
62
63 license = stdenv.lib.licenses.gpl2;
64
65 maintainers = with lib.maintainers; [ lheckemann ];
66 platforms = stdenv.lib.platforms.mesaPlatforms;
67 };
68 }