summary refs log tree commit diff
path: root/pkgs/top-level/php-packages.nix
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2019-10-01 08:22:42 +0200
committerGitHub <noreply@github.com>2019-10-01 08:22:42 +0200
commit6b11080f9f88c9cc3d0037fe73720bc434e93542 (patch)
tree21305b8aba6898a3abb259cf687a334ea16c06ac /pkgs/top-level/php-packages.nix
parent8618334d83082ea8f711794289ccd185b3efe98a (diff)
parent9cd1e90e00bd7fd05d22d50ac1649ed4c45df4d0 (diff)
downloadnixpkgs-6b11080f9f88c9cc3d0037fe73720bc434e93542.tar
nixpkgs-6b11080f9f88c9cc3d0037fe73720bc434e93542.tar.gz
nixpkgs-6b11080f9f88c9cc3d0037fe73720bc434e93542.tar.bz2
nixpkgs-6b11080f9f88c9cc3d0037fe73720bc434e93542.tar.lz
nixpkgs-6b11080f9f88c9cc3d0037fe73720bc434e93542.tar.xz
nixpkgs-6b11080f9f88c9cc3d0037fe73720bc434e93542.tar.zst
nixpkgs-6b11080f9f88c9cc3d0037fe73720bc434e93542.zip
Merge pull request #70069 from shyim/add-psalm
phpPackages.psalm: init at 3.5.3
Diffstat (limited to 'pkgs/top-level/php-packages.nix')
-rw-r--r--pkgs/top-level/php-packages.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix
index 9329eea15e6..74c4d202f37 100644
--- a/pkgs/top-level/php-packages.nix
+++ b/pkgs/top-level/php-packages.nix
@@ -486,6 +486,32 @@ let
     };
   };
 
+  psalm = mkDerivation rec {
+    version = "3.5.3";
+    pname = "psalm";
+
+    src = pkgs.fetchurl {
+      url = "https://github.com/vimeo/psalm/releases/download/${version}/psalm.phar";
+      sha256 = "1n5pfzln82wzk1qa40c436lhbin1g06lfdk89q720yzrrs07r8sw";
+    };
+
+    phases = [ "installPhase" ];
+    nativeBuildInputs = [ pkgs.makeWrapper ];
+
+    installPhase = ''
+      mkdir -p $out/bin
+      install -D $src $out/libexec/psalm/psalm.phar
+      makeWrapper ${php}/bin/php $out/bin/psalm \
+        --add-flags "$out/libexec/psalm/psalm.phar"
+    '';
+
+    meta = with pkgs.lib; {
+      description = "A static analysis tool for finding errors in PHP applications";
+      license = licenses.mit;
+      homepage = https://github.com/vimeo/psalm;
+    };
+  };
+
   psysh = mkDerivation rec {
     version = "0.9.9";
     pname = "psysh";