From 8fd810e5d35c9df868c0907dc709f3f0c968a0dc Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 16 Nov 2007 18:37:23 +0000 Subject: [PATCH] This was needed for me to get a working gnome-doc-utils package svn path=/nixpkgs/trunk/; revision=9726 --- pkgs/desktops/gnome/default.nix | 2 +- pkgs/desktops/gnome/gnome-doc-utils.nix | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/desktops/gnome/default.nix b/pkgs/desktops/gnome/default.nix index 6410e9c053ac..9b4c14340bfc 100644 --- a/pkgs/desktops/gnome/default.nix +++ b/pkgs/desktops/gnome/default.nix @@ -210,7 +210,7 @@ rec { gnomedocutils = import ./gnome-doc-utils.nix { inherit stdenv fetchurl pkgconfig perl perlXMLParser python - libxml2 libxslt gettext; + libxml2 libxslt gettext libxml2Python; input = desktop.gnomedocutils; }; diff --git a/pkgs/desktops/gnome/gnome-doc-utils.nix b/pkgs/desktops/gnome/gnome-doc-utils.nix index f1650d9650a8..8a77d96475f3 100644 --- a/pkgs/desktops/gnome/gnome-doc-utils.nix +++ b/pkgs/desktops/gnome/gnome-doc-utils.nix @@ -1,7 +1,4 @@ -{ input, stdenv, fetchurl, pkgconfig, perl, perlXMLParser, python -, libxml2, libxslt, gettext -}: - +args: with args; # !!! xml2po needs to store the path to libxml2 stdenv.mkDerivation { @@ -9,8 +6,18 @@ stdenv.mkDerivation { buildInputs = [ pkgconfig perl perlXMLParser python - libxml2 libxslt gettext + libxml2 libxslt gettext python libxml2Python ]; configureFlags = "--disable-scrollkeeper"; + + postInstall = " + mv \$out/bin/xml2po \$out/bin/.xml2po.orig + pythonPathLibXml2=\"\$(toPythonPath ${libxml2Python})\" + echo -e '#! ${stdenv.shell}\nPYTHONPATH=$PYTHONPATH:'\"\$( toPythonPath \$out )"+ + ":\${pythonPathLibXml2//python2.5/python2.4}"+ + ":\$( toPythonPath ${libxml2Python} )\""+ + "' \$(dirname \$0)/.xml2po.orig \"\$@\"' > \$out/bin/xml2po; + chmod a+x \$out/bin/xml2po + "; }