diff --git a/pkgs/development/tools/wp-cli/default.nix b/pkgs/development/tools/wp-cli/default.nix new file mode 100644 index 000000000000..418e23eb0e71 --- /dev/null +++ b/pkgs/development/tools/wp-cli/default.nix @@ -0,0 +1,38 @@ +{ stdenv, lib, writeText, bash, fetchurl, php }: + +let + phpIni = writeText "wp-cli-php.ini" '' + [Phar] + phar.readonly = Off + ''; + +in stdenv.mkDerivation rec { + version = "0.23.1"; + name = "wp-cli-${version}"; + + src = fetchurl { + url = "https://github.com/wp-cli/wp-cli/releases/download/v${version}/${name}.phar"; + sha256 = "1sjai8gjsx6j82lsxq9m827bczp4ajnldk6ibj4krcisn9pjva5f"; + }; + + propagatedBuildInputs = [ php ]; + + buildCommand = '' + mkdir -p $out/bin + + cat >$out/bin/wp <