diff options
author | Ludovic Courtès <ludo@gnu.org> | 2008-02-22 16:24:58 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2008-02-22 16:24:58 +0000 |
commit | c800565c73b886cb0d2ff2c6b790e896eab6dd54 (patch) | |
tree | 641ef9063c0387a84939693d8c04b6b05957ebc3 /pkgs | |
parent | c18141227fb831bcc8f24a57a985b9d71439e088 (diff) |
Make Inkscape properly depend on Python, which is needed for some features.
svn path=/nixpkgs/trunk/; revision=10836
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/graphics/inkscape/configure-python-libs.patch | 11 | ||||
-rw-r--r-- | pkgs/applications/graphics/inkscape/default.nix | 32 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 3 |
3 files changed, 44 insertions, 2 deletions
diff --git a/pkgs/applications/graphics/inkscape/configure-python-libs.patch b/pkgs/applications/graphics/inkscape/configure-python-libs.patch new file mode 100644 index 0000000000000..4999a55d00b70 --- /dev/null +++ b/pkgs/applications/graphics/inkscape/configure-python-libs.patch @@ -0,0 +1,11 @@ +--- inkscape-0.45.1/configure 2007-03-20 14:56:43.000000000 +0100 ++++ inkscape-0.45.1/configure 2008-02-22 16:19:10.000000000 +0100 +@@ -10202,7 +10202,7 @@ if test "x$with_python" = "xyes"; then + if test "$?" -gt "0"; then + with_python="no" + else +- checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '%s/%s %s' % (distutils.sysconfig.get_config_var('LIBPL'),distutils.sysconfig.get_config_var('LDLIBRARY'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null` ++ checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '-L%s -lpython2.4 %s' % (distutils.sysconfig.get_config_var('LIBDIR'),distutils.sysconfig.get_config_var('LIBS'))" 2>/dev/null` + if test "$?" -gt "0"; then + with_python="no" + else diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index dfed92f691eb8..7a9c354c31097 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -8,7 +8,9 @@ glib, gtkmm, glibmm, libsigcxx, boost, - gettext + gettext, + python, pyxml, + makeWrapper }: stdenv.mkDerivation { @@ -19,6 +21,16 @@ stdenv.mkDerivation { sha256 = "1y0b9bm8chn6a2ip99dj4dhg0188yn67v571ha0x38wrlmvn4k0d"; }; + # Work around Python misdetection and set `PYTHON_LIBS' to + # "-L/nix/store/... -lpython2.4" instead of "/nix/store/.../libpython2.4.so". + patches = [ ./configure-python-libs.patch ]; + + propagatedBuildInputs = [ + # Python is used at run-time to execute scripts, e.g., those from + # the "Effects" menu. + python pyxml + ]; + buildInputs = [ pkgconfig perl perlXMLParser @@ -32,9 +44,27 @@ stdenv.mkDerivation { lcms boost gettext + makeWrapper ]; + configureFlags = "--with-python"; + + postInstall = '' + # Make sure PyXML modules can be found at run-time. + for i in "$out/bin/"* + do + # FIXME: We're assuming Python 2.4. + wrapProgram "$i" --prefix PYTHONPATH : \ + "${pyxml}/lib/python2.4/site-packages" || \ + exit 2 + done + ''; + meta = { + license = "GPL"; homepage = http://www.inkscape.org; + description = ''Inkscape is a feature-rich vector graphics editor + that edits files in the W3C SVG (Scalable Vector + Graphics) file format.''; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1be9f913fd3be..568d738f16bc2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4919,7 +4919,8 @@ rec { inkscape = import ../applications/graphics/inkscape { inherit fetchurl stdenv perl perlXMLParser pkgconfig zlib popt libxml2 libxslt libpng boehmgc fontconfig gtkmm - glibmm libsigcxx lcms boost gettext; + glibmm libsigcxx lcms boost gettext + python pyxml makeWrapper; inherit (gtkLibs) gtk glib; inherit (xlibs) libXft; }; |