about summary refs log tree commit diff
path: root/pkgs/applications/graphics/inkscape/default.nix
blob: f2379220a65bab83e42f37d141ad0317e2dad84e (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
args: with args;

stdenv.mkDerivation rec {
  name = "inkscape-0.46";

  src = fetchurl {
    url = "mirror://sf/inkscape/${name}.tar.gz";
    sha256 = "0flrjqa68vnnn8lrhj86xpa6h2cyzrvjy6873v9id092f86ix1li";
  };

  patches = [ ./configure-python-libs.patch ./libpng-setjmp.patch ]; 

  propagatedBuildInputs = [
    # Python is used at run-time to execute scripts, e.g., those from
    # the "Effects" menu.
    python pyxml
  ];

  buildInputs = [
    pkgconfig perl perlXMLParser gtk libXft fontconfig libpng zlib popt boehmgc
    libxml2 libxslt glib gtkmm glibmm libsigcxx lcms boost gettext
    makeWrapper
  ];

  configureFlags = "--with-python";

  preBuild = ''
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I./extension/script"
  '';

  postInstall = ''
    # Make sure PyXML modules can be found at run-time.
    for i in "$out/bin/"*
    do
      wrapProgram "$i" --prefix PYTHONPATH :      \
       "$(toPythonPath ${pyxml})" ||  \
        exit 2
    done
  '';

  meta = {
    license = "GPL";
    homepage = http://www.inkscape.org;
    longDescription = ''
      Inkscape is a feature-rich vector graphics editor that edits
      files in the W3C SVG (Scalable Vector Graphics) file format.
    '';
  };
}