From 4577779af651c564221c5a732f5e85795328f459 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Mon, 16 Jun 2008 09:09:58 +0000 Subject: [PATCH] Fixed Inkscape build svn path=/nixpkgs/trunk/; revision=12114 --- .../graphics/inkscape/configure-python-libs.patch | 2 +- pkgs/applications/graphics/inkscape/default.nix | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/graphics/inkscape/configure-python-libs.patch b/pkgs/applications/graphics/inkscape/configure-python-libs.patch index 4999a55d00b7..840f15a40324 100644 --- a/pkgs/applications/graphics/inkscape/configure-python-libs.patch +++ b/pkgs/applications/graphics/inkscape/configure-python-libs.patch @@ -5,7 +5,7 @@ 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` ++ checkPYTHON_LIBS=`python -c "import distutils.sysconfig ; print '-L%s -lpython2.5 %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 8174290de7a1..1f8bff4db9ba 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -1,15 +1,16 @@ args: with args; stdenv.mkDerivation rec { - name = "inkscape-0.45.1"; + name = "inkscape-0.46"; src = fetchurl { url = "mirror://sf/inkscape/${name}.tar.gz"; - sha256 = "1y0b9bm8chn6a2ip99dj4dhg0188yn67v571ha0x38wrlmvn4k0d"; + sha256 = "0flrjqa68vnnn8lrhj86xpa6h2cyzrvjy6873v9id092f86ix1li"; }; # Work around Python misdetection and set `PYTHON_LIBS' to # "-L/nix/store/... -lpython2.4" instead of "/nix/store/.../libpython2.4.so". + # Changed to 2.5 patches = [ ./configure-python-libs.patch ]; propagatedBuildInputs = [ @@ -26,13 +27,16 @@ stdenv.mkDerivation rec { 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 - # FIXME: We're assuming Python 2.4. wrapProgram "$i" --prefix PYTHONPATH : \ - "${pyxml}/lib/python2.4/site-packages" || \ + "$(toPythonPath ${pyxml})" || \ exit 2 done '';