about summary refs log tree commit diff
path: root/pkgs/servers/gpsd
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-11-11 20:52:07 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2018-11-13 19:14:10 -0600
commitbfbfe941abba2a0d7061c86d78b1e8facdeb17f8 (patch)
tree2f6b86640ce155d6ecf2c5ec79811ad63c2cc703 /pkgs/servers/gpsd
parent1ba9fd335d90bca03b3868d3bf10c3d9a9de29c6 (diff)
downloadnixlib-bfbfe941abba2a0d7061c86d78b1e8facdeb17f8.tar
nixlib-bfbfe941abba2a0d7061c86d78b1e8facdeb17f8.tar.gz
nixlib-bfbfe941abba2a0d7061c86d78b1e8facdeb17f8.tar.bz2
nixlib-bfbfe941abba2a0d7061c86d78b1e8facdeb17f8.tar.lz
nixlib-bfbfe941abba2a0d7061c86d78b1e8facdeb17f8.tar.xz
nixlib-bfbfe941abba2a0d7061c86d78b1e8facdeb17f8.tar.zst
nixlib-bfbfe941abba2a0d7061c86d78b1e8facdeb17f8.zip
treewide: use scons setup hook
Lots of packages can use it. Here is the list:

- jackmix
- klick
- mixx
- nova-filters
- rhvoice
- giv
- mypaint
- swift-im
- bombono
- mapnik
- serf
- nuitka
- pyexiv2
- godot
- hammer
- toluapp
- btanks
- dxx-rebirth
- endless-sky
- globulation
- the-powder-toy
- fceux
- gpsd
- mongodb
- rippled
- mariadb
- lprof
Diffstat (limited to 'pkgs/servers/gpsd')
-rw-r--r--pkgs/servers/gpsd/default.nix28
1 files changed, 14 insertions, 14 deletions
diff --git a/pkgs/servers/gpsd/default.nix b/pkgs/servers/gpsd/default.nix
index 6e270192063b..f205b600dd95 100644
--- a/pkgs/servers/gpsd/default.nix
+++ b/pkgs/servers/gpsd/default.nix
@@ -44,30 +44,30 @@ stdenv.mkDerivation rec {
 
   # - leapfetch=no disables going online at build time to fetch leap-seconds
   #   info. See <gpsd-src>/build.txt for more info.
-  buildPhase = ''
+  preBuild = ''
     patchShebangs .
     sed -e "s|systemd_dir = .*|systemd_dir = '$out/lib/systemd/system'|" -i SConstruct
-    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"
+
+    sconsFlags+=" udevdir=$out/lib/udev"
+    sconsFlags+=" python_libdir=$out/lib/${python2Packages.python.libPrefix}/site-packages"
   '';
 
-  checkPhase = ''
+  sconsFlags = [
+    "leapfetch=no"
+    "gpsd_user=${gpsdUser}"
+    "gpsd_group=${gpsdGroup}"
+    "systemd=yes"
+  ];
+
+  preCheck = ''
     export LD_LIBRARY_PATH="$PWD"
-    scons check
   '';
 
   # TODO: the udev rules file and the hotplug script need fixes to work on NixOS
-  installPhase = ''
+  preInstall = ''
     mkdir -p "$out/lib/udev/rules.d"
-    scons install udev-install
   '';
+  installTargets = "install udev-install";
 
   postFixup = ''
     wrapPythonProgramsIn $out/bin "$out $pythonPath"