summary refs log tree commit diff
path: root/pkgs/servers/gpsd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/gpsd/default.nix')
-rw-r--r--pkgs/servers/gpsd/default.nix17
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix
index 911f3b23f0c..6e270192063 100644
--- a/pkgs/servers/gpsd/default.nix
+++ b/pkgs/servers/gpsd/default.nix
@@ -2,6 +2,7 @@
 , ncurses, libX11, libXt, libXpm, libXaw, libXext
 , libusb1, docbook_xml_dtd_412, docbook_xsl, bc
 , libxslt, xmlto, gpsdUser ? "gpsd", gpsdGroup ? "dialout"
+, pps-tools
 , python2Packages
 }:
 
@@ -23,7 +24,7 @@ stdenv.mkDerivation rec {
 
   buildInputs = [
     python2Packages.python dbus dbus-glib ncurses libX11 libXt libXpm libXaw libXext
-    libxslt libusb1
+    libxslt libusb1 pps-tools
   ];
 
   pythonPath = [
@@ -37,6 +38,8 @@ stdenv.mkDerivation rec {
 
     # TODO: remove the patch with the next release
     ./0001-Use-pkgconfig-for-dbus-library.patch
+    # to be able to find pps-tools
+    ./0002-scons-envs-patch.patch
   ];
 
   # - leapfetch=no disables going online at build time to fetch leap-seconds
@@ -44,9 +47,15 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     patchShebangs .
     sed -e "s|systemd_dir = .*|systemd_dir = '$out/lib/systemd/system'|" -i SConstruct
-    scons prefix="$out" leapfetch=no gpsd_user=${gpsdUser} gpsd_group=${gpsdGroup} \
-        systemd=yes udevdir="$out/lib/udev" \
-        python_libdir="$out/lib/${python2Packages.python.libPrefix}/site-packages"
+    scons \
+      -j $NIX_BUILD_CORES \
+      prefix="$out" \
+      leapfetch=no \
+      gpsd_user=${gpsdUser} \
+      gpsd_group=${gpsdGroup} \
+      systemd=yes \
+      udevdir="$out/lib/udev" \
+      python_libdir="$out/lib/${python2Packages.python.libPrefix}/site-packages"
   '';
 
   checkPhase = ''