summary refs log tree commit diff
path: root/pkgs/applications/graphics/mypaint/default.nix
blob: 1acaf4850ebec5d42334f0ea04d623b6191286ef (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ stdenv
, fetchFromGitHub
, gtk3
, intltool
, json_c
, lcms2
, libpng
, librsvg
, gobject-introspection
, gdk-pixbuf
, pkgconfig
, python2
, scons
, swig
, wrapGAppsHook
}:

let
  inherit (python2.pkgs) pycairo pygobject3 numpy;
in stdenv.mkDerivation {
  pname = "mypaint";
  version = "1.2.1";

  src = fetchFromGitHub {
    owner = "mypaint";
    repo = "mypaint";
    rev = "bcf5a28d38bbd586cc9d4cee223f849fa303864f";
    sha256 = "1zwx7n629vz1jcrqjqmw6vl6sxdf81fq6a5jzqiga8167gg8s9pf";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    intltool
    pkgconfig
    scons
    swig
    wrapGAppsHook
    gobject-introspection # for setup hook
  ];

  buildInputs = [
    gtk3
    gdk-pixbuf
    json_c
    lcms2
    libpng
    librsvg
    pycairo
    pygobject3
    python2
  ];

  propagatedBuildInputs = [
    numpy
  ];

  postInstall = ''
    sed -i -e 's|/usr/bin/env python2.7|${python2}/bin/python|' $out/bin/mypaint
  '';

  preFixup = ''
    gappsWrapperArgs+=(--prefix PYTHONPATH : $PYTHONPATH)
  '';

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