* wrapPythonPrograms: rewrite the common "#! .../env python" idiom to

"#! .../python".

svn path=/nixpkgs/branches/modular-python/; revision=26583
This commit is contained in:
Eelco Dolstra
2011-03-28 17:19:27 +00:00
parent 7b3bda471d
commit 968496e69b
3 changed files with 14 additions and 20 deletions
+6 -16
View File
@@ -1,6 +1,6 @@
{ fetchurl, stdenv, python, pkgconfig, dbus, dbus_glib
, ncurses, libX11, libXt, libXpm, libXaw, libXext, makeWrapper
, libxslt, xmlto, gpsdUser ? "gpsd" }:
, ncurses, libX11, libXt, libXpm, libXaw, libXext, wrapPython
, libxslt, xmlto, gpsdUser ? "gpsd", pythonPackages }:
stdenv.mkDerivation rec {
name = "gpsd-2.39";
@@ -13,28 +13,18 @@ stdenv.mkDerivation rec {
buildInputs = [
python pkgconfig dbus dbus_glib ncurses
libX11 libXt libXpm libXaw libXext
makeWrapper libxslt xmlto
wrapPython libxslt xmlto
];
configureFlags = "--enable-dbus --enable-gpsd-user=${gpsdUser} "
pythonPath = [ pythonPackages.curses ];
configureFlags = "--enable-dbus --enable-gpsd-user=${gpsdUser} "
# Make sure `xgpsspeed' has libXt and libX11 in its RPATH.
+ "LDFLAGS=-Wl,--rpath=${libXt}/lib:${libX11}/lib";
doCheck = true;
postInstall = ''
for prog in "$out/bin"/*
do
if grep -q python "$prog"
then
echo "patching \`$prog'..."
wrapProgram "$prog" \
--prefix PATH ":" "${python}/bin" \
--prefix PYTHONPATH ":" "$out/lib/${python.libPrefix}/site-packages"
fi
done
'';
postInstall = "wrapPythonPrograms";
meta = {
description = "`gpsd', a GPS service daemon";