2021-06-03 14:06:06 +01:00
|
|
|
{ lib, stdenv, fetchurl, php, which, makeWrapper, bash, coreutils, ncurses }:
|
2013-12-05 04:11:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "drush-6.1.0";
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2013-12-05 04:11:35 +00:00
|
|
|
description = "Command-line shell and Unix scripting interface for Drupal";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/drush-ops/drush";
|
2013-12-05 04:11:35 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://github.com/drush-ops/drush/archive/6.1.0.tar.gz";
|
2013-12-05 04:11:35 +00:00
|
|
|
sha256 = "1jgnc4jjyapyn04iczvcz92ic0vq8d1w8xi55ismqyy5cxhqj6bp";
|
|
|
|
};
|
|
|
|
|
|
|
|
consoleTable = fetchurl {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "http://download.pear.php.net/package/Console_Table-1.1.3.tgz";
|
2013-12-05 04:11:35 +00:00
|
|
|
sha256 = "07gbjd7m1fj5dmavr0z20vkqwx1cz2522sj9022p257jifj1yl76";
|
|
|
|
};
|
|
|
|
|
2020-03-22 00:26:24 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2013-12-05 04:11:35 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# install libraries
|
|
|
|
cd lib
|
|
|
|
tar -xf ${consoleTable}
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
mkdir -p "$out"
|
|
|
|
cp -r . "$out/src"
|
|
|
|
mkdir "$out/bin"
|
2021-06-03 14:06:06 +01:00
|
|
|
wrapProgram "$out/src/drush" --prefix PATH : "${lib.makeBinPath [ which php bash coreutils ncurses ]}"
|
2013-12-05 04:11:35 +00:00
|
|
|
ln -s "$out/src/drush" "$out/bin/drush"
|
|
|
|
'';
|
|
|
|
}
|