at 23.11-beta 31 lines 957 B view raw
1{ lib, stdenv, fetchurl, fetchFromGitHub, php, which, makeWrapper, bash, coreutils, ncurses }: 2 3stdenv.mkDerivation rec { 4 pname = "drush"; 5 version = "8.4.12"; 6 7 src = fetchurl { 8 url = "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar"; 9 sha256 = "sha256-YtD9lD621LJJAM/ieL4KWvY4o4Uqo3+FWgjGYGdQQaw="; 10 }; 11 12 dontUnpack = true; 13 14 nativeBuildInputs = [ makeWrapper ]; 15 16 installPhase = '' 17 mkdir -p $out/bin 18 install -D $src $out/libexec/drush/drush.phar 19 makeWrapper ${php}/bin/php $out/bin/drush \ 20 --add-flags "$out/libexec/drush/drush.phar" \ 21 --prefix PATH : "${lib.makeBinPath [ which php bash coreutils ncurses ]}" 22 ''; 23 24 meta = with lib; { 25 description = "Command-line shell and Unix scripting interface for Drupal"; 26 homepage = "https://github.com/drush-ops/drush"; 27 license = licenses.gpl2; 28 maintainers = with maintainers; [ lovek323 ]; 29 platforms = platforms.all; 30 }; 31}