about summary refs log tree commit diff
path: root/pkgs/applications/graphics/mypaint/default.nix
blob: 8abdb3c7bb5a3374988981aca5a4f66a87ff3675 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv, fetchurl, gettext, glib, gtk2, hicolor_icon_theme, json_c
, lcms2, libpng , makeWrapper, pkgconfig, pygtk, python, pythonPackages
, scons, swig
}:

stdenv.mkDerivation rec {
  name = "mypaint-${version}";
  version = "1.1.0";

  src = fetchurl {
    url = "http://download.gna.org/mypaint/${name}.tar.bz2";
    sha256 = "0f7848hr65h909c0jkcx616flc0r4qh53g3kd1cgs2nr1pjmf3bq";
  };

  buildInputs = [
    gettext glib gtk2 json_c lcms2 libpng makeWrapper pkgconfig pygtk
    python scons swig
  ];

  propagatedBuildInputs = [ hicolor_icon_theme pythonPackages.numpy ];

  buildPhase = "scons prefix=$out";

  installPhase = ''
    scons prefix=$out install
    sed -i -e 's|/usr/bin/env python2.7|${python}/bin/python|' $out/bin/mypaint
    wrapProgram $out/bin/mypaint \
      --prefix PYTHONPATH : $PYTHONPATH \
      --prefix XDG_DATA_DIRS ":" "${hicolor_icon_theme}/share"
  '';

  meta = with stdenv.lib; {
    description = "A graphics application for digital painters";
    homepage = http://mypaint.intilinux.com;
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = [ maintainers.goibhniu ];
  };
}