From 3b3e2c080f71a25d1aaf17fd76179709356058bb Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 22 Mar 2020 01:26:24 +0100 Subject: [PATCH 1/2] drush: fix buildInputs / nativeBuildInputs `makeWrapper` is a nativeBuildInput, and `php` and `which` are actually only needed when constructing the wrapper, but no `buildInputs`. --- pkgs/development/tools/misc/drush/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/drush/default.nix b/pkgs/development/tools/misc/drush/default.nix index f9a640d4703..670c4e258f1 100644 --- a/pkgs/development/tools/misc/drush/default.nix +++ b/pkgs/development/tools/misc/drush/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { sha256 = "07gbjd7m1fj5dmavr0z20vkqwx1cz2522sj9022p257jifj1yl76"; }; - buildInputs = [ php which makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; installPhase = '' # install libraries From 382e751a68b177f9dd3aedfdbf8cae348b48052b Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 22 Mar 2020 01:27:58 +0100 Subject: [PATCH 2/2] drush: still needs php 7.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If invoked with php 7.4 on a up2date Drupal 7 installation, drush complains with a deprecation warning, that swallows all legit output: > drush uli Deprecated function: Array and string offset access syntax with curly braces is [error] deprecated in include_once() (line 20 of /var/www/…/htdocs/includes/file.phar.inc). Use php7.3 when invoking drush. --- pkgs/development/tools/misc/drush/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/drush/default.nix b/pkgs/development/tools/misc/drush/default.nix index 670c4e258f1..e0f85c45f29 100644 --- a/pkgs/development/tools/misc/drush/default.nix +++ b/pkgs/development/tools/misc/drush/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, php, which, makeWrapper, bash, coreutils, ncurses }: +{ stdenv, fetchurl, php73, which, makeWrapper, bash, coreutils, ncurses }: stdenv.mkDerivation rec { name = "drush-6.1.0"; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { mkdir -p "$out" cp -r . "$out/src" mkdir "$out/bin" - wrapProgram "$out/src/drush" --prefix PATH : "${stdenv.lib.makeBinPath [ which php bash coreutils ncurses ]}" + wrapProgram "$out/src/drush" --prefix PATH : "${stdenv.lib.makeBinPath [ which php73 bash coreutils ncurses ]}" ln -s "$out/src/drush" "$out/bin/drush" ''; }