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
This commit is contained in:
Matthew Bauer
2018-11-13 19:14:10 -06:00
parent 1ba9fd335d
commit bfbfe941ab
28 changed files with 149 additions and 260 deletions
+14 -14
View File
@@ -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"