pps-tools: init at 1.0.2, enable for chrony, gpsd, ntp (#42889)

This commit is contained in:
Richard Marko
2018-07-04 11:28:07 +00:00
committed by Orivej Desh (NixOS)
parent 45f8c2ac29
commit 91575dd285
6 changed files with 66 additions and 8 deletions
@@ -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]
+13 -4
View File
@@ -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 = ''