diff options
author | Alexey Shmalko <rasen.dubi@gmail.com> | 2016-07-09 19:50:13 +0300 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2016-07-10 18:48:13 +0200 |
commit | 34fab1a858ce6dbda86520ceb11f2cd3a31ba468 (patch) | |
tree | d8dfb4027843914697408e95815f5046a1a55689 /pkgs/servers | |
parent | 5a245c24b0188c6fff933497545f6e84d9b024c0 (diff) | |
download | nixlib-34fab1a858ce6dbda86520ceb11f2cd3a31ba468.tar nixlib-34fab1a858ce6dbda86520ceb11f2cd3a31ba468.tar.gz nixlib-34fab1a858ce6dbda86520ceb11f2cd3a31ba468.tar.bz2 nixlib-34fab1a858ce6dbda86520ceb11f2cd3a31ba468.tar.lz nixlib-34fab1a858ce6dbda86520ceb11f2cd3a31ba468.tar.xz nixlib-34fab1a858ce6dbda86520ceb11f2cd3a31ba468.tar.zst nixlib-34fab1a858ce6dbda86520ceb11f2cd3a31ba468.zip |
gpsd: fix python dependencies
This fixes xgps and xgpsspeed executables.
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/gpsd/default.nix | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix index 17325ccb2914..c7bce2e41211 100644 --- a/pkgs/servers/gpsd/default.nix +++ b/pkgs/servers/gpsd/default.nix @@ -1,10 +1,10 @@ -{ fetchurl, stdenv, scons, pythonFull, pkgconfig, dbus, dbus_glib -, ncurses, libX11, libXt, libXpm, libXaw, libXext, makeWrapper +{ fetchurl, stdenv, scons, pkgconfig, dbus, dbus_glib +, ncurses, libX11, libXt, libXpm, libXaw, libXext , libusb1, docbook_xml_dtd_412, docbook_xsl, bc , libxslt, xmlto, gpsdUser ? "gpsd", gpsdGroup ? "dialout" +, pythonPackages }: -# TODO: the 'xgps' program doesn't work: "ImportError: No module named gobject" # TODO: put the X11 deps behind a guiSupport parameter for headless support stdenv.mkDerivation rec { @@ -16,15 +16,21 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ - scons makeWrapper pkgconfig docbook_xml_dtd_412 docbook_xsl xmlto bc - pythonFull + scons pkgconfig docbook_xml_dtd_412 docbook_xsl xmlto bc + pythonPackages.python + pythonPackages.wrapPython ]; buildInputs = [ - pythonFull dbus dbus_glib ncurses libX11 libXt libXpm libXaw libXext + pythonPackages.python dbus dbus_glib ncurses libX11 libXt libXpm libXaw libXext libxslt libusb1 ]; + pythonPath = [ + pythonPackages.pygobject + pythonPackages.pygtk + ]; + patches = [ ./0001-Import-LD_LIBRARY_PATH-to-allow-running-scons-check-.patch ./0002-Import-XML_CATALOG_FILES-to-be-able-to-validate-the-.patch @@ -37,14 +43,11 @@ stdenv.mkDerivation rec { # we use $LD_LIBRARY_PATH instead. buildPhase = '' patchShebangs . - mkdir -p "$out" - sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonFull.libPrefix}/site-packages\"|" -i SConstruct + sed -e "s|python_lib_dir = .*|python_lib_dir = \"$out/lib/${pythonPackages.python.libPrefix}/site-packages\"|" -i SConstruct scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \ systemd=yes udevdir="$out/lib/udev" chrpath=no ''; - doCheck = false; - checkPhase = '' export LD_LIBRARY_PATH="$PWD" scons check @@ -52,12 +55,13 @@ stdenv.mkDerivation rec { # TODO: the udev rules file and the hotplug script need fixes to work on NixOS installPhase = '' - scons install mkdir -p "$out/lib/udev/rules.d" - scons udev-install + scons install udev-install ''; - postInstall = "wrapPythonPrograms"; + postFixup = '' + wrapPythonProgramsIn $out/bin "$out $pythonPath" + ''; meta = with stdenv.lib; { description = "GPS service daemon"; @@ -82,6 +86,6 @@ stdenv.mkDerivation rec { homepage = http://catb.org/gpsd/; license = "BSD-style"; platforms = platforms.linux; - maintainers = [ maintainers.bjornfor ]; + maintainers = with maintainers; [ bjornfor rasendubi ]; }; } |