From 1fd3f2dabdb694b79ef43c45d32f60a2cbf58f94 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Wed, 19 Feb 2025 18:28:39 -0800 Subject: [PATCH] feat(home): Add NodeJS to PHPStorm --- modules/home/programs/gui/phpstorm/default.nix | 3 ++- packages/phpstorm-with-node/default.nix | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 packages/phpstorm-with-node/default.nix diff --git a/modules/home/programs/gui/phpstorm/default.nix b/modules/home/programs/gui/phpstorm/default.nix index 9381ec1..2c98fb0 100644 --- a/modules/home/programs/gui/phpstorm/default.nix +++ b/modules/home/programs/gui/phpstorm/default.nix @@ -13,7 +13,8 @@ in { nixpkgs.config.allowUnfree = lib.mkForce true; home.packages = with pkgs; [ - jetbrains.phpstorm + # jetbrains.phpstorm + marleyos.phpstorm-with-node ]; home.file.".ideavimrc".source = ./.ideavimrc; diff --git a/packages/phpstorm-with-node/default.nix b/packages/phpstorm-with-node/default.nix new file mode 100644 index 0000000..cf0890f --- /dev/null +++ b/packages/phpstorm-with-node/default.nix @@ -0,0 +1,17 @@ +{ + 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 +''