summary refs log tree commit diff
path: root/pkgs/top-level/php-packages.nix
diff options
context:
space:
mode:
authorJavier Aguirre <contacto@javaguirre.net>2015-10-12 11:44:48 +0200
committerJavier Aguirre <contacto@javaguirre.net>2015-10-12 12:11:54 +0200
commit9522afae2cc3fbaefb1d3ede889f9a28fc1614b5 (patch)
treec926ae96b0bf1762780498eb9e710f0114bde8c7 /pkgs/top-level/php-packages.nix
parent4f1db1f0f85a1dc623816c1581354ad4467adafd (diff)
downloadnixpkgs-9522afae2cc3fbaefb1d3ede889f9a28fc1614b5.tar
nixpkgs-9522afae2cc3fbaefb1d3ede889f9a28fc1614b5.tar.gz
nixpkgs-9522afae2cc3fbaefb1d3ede889f9a28fc1614b5.tar.bz2
nixpkgs-9522afae2cc3fbaefb1d3ede889f9a28fc1614b5.tar.lz
nixpkgs-9522afae2cc3fbaefb1d3ede889f9a28fc1614b5.tar.xz
nixpkgs-9522afae2cc3fbaefb1d3ede889f9a28fc1614b5.tar.zst
nixpkgs-9522afae2cc3fbaefb1d3ede889f9a28fc1614b5.zip
phpcs: init at 2.3.4
Adding javaguirre to maintainers
Diffstat (limited to 'pkgs/top-level/php-packages.nix')
-rw-r--r--pkgs/top-level/php-packages.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index e9f2d145226..96c4ab06a51 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -139,4 +139,31 @@ let self = with self; {
       maintainers = with maintainers; [ globin offline ];
     };
   };
+
+  phpcs = pkgs.stdenv.mkDerivation rec {
+    name = "phpcs-${version}";
+    version = "2.3.4";
+
+    src = pkgs.fetchurl {
+      url = "https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${version}/phpcs.phar";
+      sha256 = "ce11e02fba30a35a80b691b05be20415eb8b5dea585a4e6646803342b86abb8c";
+    };
+
+    phases = [ "installPhase" ];
+    buildInputs = [ pkgs.makeWrapper ];
+
+    installPhase = ''
+      mkdir -p $out/bin
+      install -D $src $out/libexec/phpcs/phpcs.phar
+      makeWrapper ${php}/bin/php $out/bin/phpcs \
+        --add-flags "$out/libexec/phpcs/phpcs.phar"
+    '';
+
+    meta = with pkgs.lib; {
+      description = "PHP coding standard tool";
+      license = licenses.bsd3;
+      homepage = https://squizlabs.github.io/PHP_CodeSniffer/;
+      maintainers = with maintainers; [ javaguirre ];
+    };
+  };
 }; in self