From baf401cdf470cad6f7bc3161578cf09380e7cc40 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 13 Sep 2016 18:20:51 +0800 Subject: [PATCH] wp-cli: 0.23.1 -> 0.24.1 --- pkgs/development/tools/wp-cli/default.nix | 36 ++++++++++++----------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/pkgs/development/tools/wp-cli/default.nix b/pkgs/development/tools/wp-cli/default.nix index 418e23eb0e71..a116e8b73e22 100644 --- a/pkgs/development/tools/wp-cli/default.nix +++ b/pkgs/development/tools/wp-cli/default.nix @@ -1,38 +1,40 @@ -{ stdenv, lib, writeText, bash, fetchurl, php }: +{ stdenv, lib, writeText, writeScript, fetchurl, php }: let + version = "0.24.1"; + name = "wp-cli-${version}"; + phpIni = writeText "wp-cli-php.ini" '' [Phar] phar.readonly = Off ''; -in stdenv.mkDerivation rec { - version = "0.23.1"; - name = "wp-cli-${version}"; + wpBin = writeScript "wp" '' + #! ${stdenv.shell} -e + exec ${php}/bin/php \ + -c ${phpIni} \ + -f ${src} "$@" + ''; src = fetchurl { url = "https://github.com/wp-cli/wp-cli/releases/download/v${version}/${name}.phar"; - sha256 = "1sjai8gjsx6j82lsxq9m827bczp4ajnldk6ibj4krcisn9pjva5f"; + sha256 = "027nclp8qbfr624ja6aixzcwnvb55d7dskk9l1i042bc86hmphfd"; }; - propagatedBuildInputs = [ php ]; +in stdenv.mkDerivation rec { + + inherit name; buildCommand = '' mkdir -p $out/bin - - cat >$out/bin/wp <