From b6fce7201ed29e601b0f7e4fd2f1fd0ce4faf042 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 14 Nov 2018 13:57:41 -0600 Subject: [PATCH 1/4] xboxdrv: add dontUseSconsInstall flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- pkgs/development/tools/build-managers/scons/setup-hook.sh | 2 +- pkgs/misc/drivers/xboxdrv/default.nix | 8 +++----- 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 bb5591c4620..55159aa5a93 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 3cc7869eb0a..c942ec59f37 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/; From 9cac8feafb1e5607cd56e4b9019e2fb31038726c Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 14 Nov 2018 14:00:19 -0600 Subject: [PATCH 2/4] mapnik: use provided configure script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This gives us support for the class autoconf “./configure && make && make install” build-style. --- pkgs/development/libraries/mapnik/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mapnik/default.nix b/pkgs/development/libraries/mapnik/default.nix index 5a6a44285ed..0c88cff7773 100644 --- a/pkgs/development/libraries/mapnik/default.nix +++ b/pkgs/development/libraries/mapnik/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { # a distinct dev output makes python-mapnik fail outputs = [ "out" ]; - nativeBuildInputs = [ python scons ]; + nativeBuildInputs = [ python ]; buildInputs = [ boost cairo freetype gdal harfbuzz icu libjpeg libpng libtiff @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { prefixKey = "PREFIX="; - sconsFlags = [ + configureFlags = [ "BOOST_INCLUDES=${boost.dev}/include" "BOOST_LIBS=${boost.out}/lib" "CAIRO_INCLUDES=${cairo.dev}/include" From d3751930570ae5dcd32d423b9fd384b9958cfb65 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 14 Nov 2018 14:01:03 -0600 Subject: [PATCH 3/4] dxx-rebirth: prevent infinite loop The postInstall phase should not run postInstall itself! My mistake in renaming the old installPhase. --- pkgs/games/dxx-rebirth/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/games/dxx-rebirth/default.nix b/pkgs/games/dxx-rebirth/default.nix index 3e6bc2dc6f5..86d233b0378 100644 --- a/pkgs/games/dxx-rebirth/default.nix +++ b/pkgs/games/dxx-rebirth/default.nix @@ -42,8 +42,6 @@ in stdenv.mkDerivation rec { postInstall = '' install -Dm644 ${music} $out/share/games/dxx-rebirth/d2xr-sc55-music.dxa install -Dm644 -t $out/share/doc/dxx-rebirth *.txt - - runHook postInstall ''; meta = with stdenv.lib; { From df8ee064772e6dde062a5fc91d96557eaec4f8a2 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 14 Nov 2018 14:02:56 -0600 Subject: [PATCH 4/4] glib: only add gsettingsschemadir in make MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gsettingsschemedir only works in make where you can set any variable from the command line as in “make VAR=VAL”. Other build systems may not support this kind of loose overriding of variables. This broke a scons build here: https://hydra.nixos.org/build/84073119/ --- pkgs/development/libraries/glib/setup-hook.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh index 233845c6541..5275529991f 100644 --- a/pkgs/development/libraries/glib/setup-hook.sh +++ b/pkgs/development/libraries/glib/setup-hook.sh @@ -9,7 +9,7 @@ addEnvHooks "$hostOffset" make_glib_find_gsettings_schemas # Install gschemas, if any, in a package-specific directory glibPreInstallPhase() { - installFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/") + makeFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/") } preInstallPhases+=" glibPreInstallPhase"