diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index ce647a8d5682..2cbdd0aee5c0 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -7,6 +7,12 @@ let inherit (pkgs) stdenv autoreconfHook fetchurl; }; + # Wrap mkDerivation to prepend pname with "php-" to make names consistent + # with how buildPecl does it and make the file easier to overview. + mkDerivation = { pname, ... }@args: pkgs.stdenv.mkDerivation (args // { + pname = "php-${pname}"; + }); + isPhp73 = pkgs.lib.versionAtLeast php.version "7.3"; apcu = buildPecl rec { @@ -39,9 +45,9 @@ let sha256 = "0ja74k2lmxwhhvp9y9kc7khijd7s2dqma5x8ghbhx9ajkn0wg8iq"; }; - box = pkgs.stdenv.mkDerivation rec { + box = mkDerivation rec { version = "2.7.5"; - pname = "php-box"; + pname = "box"; src = pkgs.fetchurl { url = "https://github.com/box-project/box2/releases/download/${version}/box-${version}.phar"; @@ -66,9 +72,9 @@ let }; }; - composer = pkgs.stdenv.mkDerivation rec { + composer = mkDerivation rec { version = "1.8.5"; - pname = "php-composer"; + pname = "composer"; src = pkgs.fetchurl { url = "https://getcomposer.org/download/${version}/composer.phar"; @@ -210,7 +216,7 @@ let buildInputs = [ pkgs.unixODBC ]; }; - php-cs-fixer = pkgs.stdenv.mkDerivation rec { + php-cs-fixer = mkDerivation rec { version = "2.14.2"; pname = "php-cs-fixer"; @@ -237,7 +243,7 @@ let }; }; - php-parallel-lint = pkgs.stdenv.mkDerivation rec { + php-parallel-lint = mkDerivation rec { version = "1.0.0"; pname = "php-parallel-lint"; @@ -286,9 +292,9 @@ let meta.broken = true; }; - phpcbf = pkgs.stdenv.mkDerivation rec { + phpcbf = mkDerivation rec { version = "3.4.2"; - pname = "php-phpcbf"; + pname = "phpcbf"; src = pkgs.fetchurl { url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcbf.phar"; @@ -313,9 +319,9 @@ let }; }; - phpcs = pkgs.stdenv.mkDerivation rec { + phpcs = mkDerivation rec { version = "3.4.2"; - pname = "php-phpcs"; + pname = "phpcs"; src = pkgs.fetchurl { url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcs.phar"; @@ -340,9 +346,9 @@ let }; }; - phpstan = pkgs.stdenv.mkDerivation rec { + phpstan = mkDerivation rec { version = "0.11.5"; - pname = "php-phpstan"; + pname = "phpstan"; src = pkgs.fetchurl { url = "https://github.com/phpstan/phpstan/releases/download/${version}/phpstan.phar"; @@ -374,9 +380,9 @@ let }; }; - psysh = pkgs.stdenv.mkDerivation rec { + psysh = mkDerivation rec { version = "0.9.9"; - pname = "php-psysh"; + pname = "psysh"; src = pkgs.fetchurl { url = "https://github.com/bobthecow/psysh/releases/download/v${version}/psysh-v${version}.tar.gz";