{
  lib,
  runCommand,
  makeWrapper,
  jetbrains,
  nodePackages,
}:
runCommand "phpstorm-with-node-${jetbrains.phpstorm.version}"
{
  nativeBuildInputs = [makeWrapper];
} ''
  mkdir -p $out/{bin,share/applications}
  makeWrapper ${jetbrains.phpstorm}/bin/phpstorm $out/bin/phpstorm \
    --prefix PATH : ${lib.makeBinPath [nodePackages.nodejs]}
  ln -s ${jetbrains.phpstorm}/share/applications/phpstorm.desktop \
    $out/share/applications/phpstorm.desktop
''
