nixpkgs/pkgs/development/tools/misc/drush/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
957 B
Nix
Raw Normal View History

2021-06-15 10:42:35 +00:00
{ lib, stdenv, fetchurl, fetchFromGitHub, php, which, makeWrapper, bash, coreutils, ncurses }:
2013-12-05 04:11:35 +00:00
stdenv.mkDerivation rec {
pname = "drush";
2022-07-08 08:24:03 +00:00
version = "8.4.11";
2013-12-05 04:11:35 +00:00
src = fetchurl {
url = "https://github.com/drush-ops/drush/releases/download/${version}/drush.phar";
2022-07-08 08:24:03 +00:00
sha256 = "sha256-4DD16PQHGZzAGwmm/WNeZ/dDKnlQslcb35AkpiJs5tQ=";
2013-12-05 04:11:35 +00:00
};
dontUnpack = true;
2013-12-05 04:11:35 +00:00
nativeBuildInputs = [ makeWrapper ];
2013-12-05 04:11:35 +00:00
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 ]}"
2013-12-05 04:11:35 +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;
};
2013-12-05 04:11:35 +00:00
}