From 91575dd285efcd75d7e09a94ef619bf4a6bc4bd2 Mon Sep 17 00:00:00 2001 From: Richard Marko Date: Wed, 4 Jul 2018 13:28:07 +0200 Subject: pps-tools: init at 1.0.2, enable for chrony, gpsd, ntp (#42889) --- pkgs/servers/gpsd/0002-scons-envs-patch.patch | 11 +++++++++++ pkgs/servers/gpsd/default.nix | 17 +++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 pkgs/servers/gpsd/0002-scons-envs-patch.patch (limited to 'pkgs/servers/gpsd') diff --git a/pkgs/servers/gpsd/0002-scons-envs-patch.patch b/pkgs/servers/gpsd/0002-scons-envs-patch.patch new file mode 100644 index 00000000000..fbb06db6aa3 --- /dev/null +++ b/pkgs/servers/gpsd/0002-scons-envs-patch.patch @@ -0,0 +1,11 @@ +--- b/SConstruct 2018-07-03 23:13:51.986746857 +0200 ++++ a/SConstruct 2018-07-03 23:14:50.495252914 +0200 +@@ -221,7 +221,7 @@ + 'STAGING_PREFIX', # Required by the OpenWRT and CeroWrt builds. + 'WRITE_PAD', # So we can test WRITE_PAD values on the fly. + ) +-envs = {} ++envs = os.environ + for var in import_env: + if var in os.environ: + envs[var] = os.environ[var] 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 = '' -- cgit 1.4.1