mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
32 lines
957 B
Nix
32 lines
957 B
Nix
{ lib, stdenv, fetchurl, fetchFromGitHub, php, which, makeWrapper, bash, coreutils, ncurses }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "drush";
|
|
version = "8.4.11";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar";
|
|
sha256 = "sha256-4DD16PQHGZzAGwmm/WNeZ/dDKnlQslcb35AkpiJs5tQ=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
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 ]}"
|
|
'';
|
|
|
|
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;
|
|
};
|
|
}
|