about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2018-11-14 13:57:41 -0600
committerMatthew Bauer <mjbauer95@gmail.com>2018-11-14 13:57:41 -0600
commitb6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042 (patch)
treed9c011728da76c4a9bf2bd3aa09f22c411e9f3a6
parent73951bc0c8c02fabe97e645838a52a12618dcd8f (diff)
downloadnixlib-b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042.tar
nixlib-b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042.tar.gz
nixlib-b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042.tar.bz2
nixlib-b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042.tar.lz
nixlib-b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042.tar.xz
nixlib-b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042.tar.zst
nixlib-b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042.zip
xboxdrv: add dontUseSconsInstall flag
xboxdrv doesn’t use scons for installing, but instead using a
makefile! Everything else is in scons so we have to keep that. I’ve
added a dontUseSconsInstall flag to the scons setup-hook to skip the
automatic overwrite of default “make install” call.
-rw-r--r--pkgs/development/tools/build-managers/scons/setup-hook.sh2
-rw-r--r--pkgs/misc/drivers/xboxdrv/default.nix8
2 files changed, 4 insertions, 6 deletions
diff --git a/pkgs/development/tools/build-managers/scons/setup-hook.sh b/pkgs/development/tools/build-managers/scons/setup-hook.sh
index bb5591c46203..55159aa5a93a 100644
--- a/pkgs/development/tools/build-managers/scons/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/scons/setup-hook.sh
@@ -75,7 +75,7 @@ if [ -z "$buildPhase" ]; then
     buildPhase=sconsBuildPhase
 fi
 
-if [ -z "$installPhase" ]; then
+if [ -z "$dontUseSconsInstall" -a -z "$installPhase" ]; then
     installPhase=sconsInstallPhase
 fi
 
diff --git a/pkgs/misc/drivers/xboxdrv/default.nix b/pkgs/misc/drivers/xboxdrv/default.nix
index 3cc7869eb0a7..c942ec59f37e 100644
--- a/pkgs/misc/drivers/xboxdrv/default.nix
+++ b/pkgs/misc/drivers/xboxdrv/default.nix
@@ -11,12 +11,10 @@ in stdenv.mkDerivation {
     sha256 = "0jx2wqmc7602dxyj19n3h8x0cpy929h7c0h39vcc5rf0q74fh3id";
   };
 
-  patchPhase = ''
-    substituteInPlace Makefile --replace /usr/local "$out"
-  '';
-
+  makeFlags = "PREFIX=$(out)";
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ scons libX11 libusb1 boost glib dbus-glib];
+  buildInputs = [ scons libX11 libusb1 boost glib dbus-glib ];
+  dontUseSconsInstall = true;
 
   meta = with stdenv.lib; {
     homepage = https://pingus.seul.org/~grumbel/xboxdrv/;