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";
|
|
|
|
version = "6.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "drush-ops";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1jgnc4jjyapyn04iczvcz92ic0vq8d1w8xi55ismqyy5cxhqj6bp";
|
|
|
|
};
|
|
|
|
|
|
|
|
consoleTable = fetchurl {
|
|
|
|
url = "http://download.pear.php.net/package/Console_Table-1.1.3.tgz";
|
|
|
|
sha256 = "07gbjd7m1fj5dmavr0z20vkqwx1cz2522sj9022p257jifj1yl76";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# install libraries
|
|
|
|
cd lib
|
|
|
|
tar -xf ${consoleTable}
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
mkdir -p "$out"
|
|
|
|
cp -r . "$out/src"
|
|
|
|
mkdir "$out/bin"
|
2021-06-06 07:54:09 +00:00
|
|
|
wrapProgram "$out/src/drush" --prefix PATH : "${lib.makeBinPath [ which php bash coreutils ncurses ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s "$out/src/drush" "$out/bin/drush"
|
|
|
|
'';
|
|
|
|
}
|