2021-07-21 07:28:18 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchFromGitHub, php, which, makeWrapper, bash, coreutils, ncurses }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-21 07:28:18 +00:00
|
|
|
pname = "drush";
|
2022-01-22 01:22:15 +00:00
|
|
|
version = "8.4.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-22 01:22:15 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar";
|
|
|
|
sha256 = "sha256-yXSoTDFLsjDiYkRfrIxv2WTVdHzgxZRvtn3Pht5XF4k=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-22 01:22:15 +00:00
|
|
|
dontUnpack = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-01-22 01:22:15 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
install -D $src $out/libexec/drush/drush.phar
|
|
|
|
makeWrapper ${php}/bin/php $out/bin/drush \
|
|
|
|
--add-flags "$out/libexec/drush/drush.phar" \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ which php bash coreutils ncurses ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2022-01-22 01:22:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command-line shell and Unix scripting interface for Drupal";
|
|
|
|
homepage = "https://github.com/drush-ops/drush";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|