Skip to content

Commit

Permalink
jetbrains.plugins: fix adding JAR plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara committed Dec 7, 2024
1 parent e23d551 commit 579d328
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkgs/applications/editors/jetbrains/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ in {
IFS=' ' read -ra pluginArray <<< "$newPlugins"
for plugin in "''${pluginArray[@]}"
do
ln -s "$plugin" -t "$out/${rootDir}/plugins/"
pluginfiles=$(ls $plugin);
if [ $(echo $pluginfiles | wc -l) -eq 1 ] && echo $pluginfiles | grep -E "\.jar" 1> /dev/null; then
# if the plugin contains a single jar file, link it directly into the plugins folder
ln -s "$plugin/$(echo $pluginfiles | head -1)" $out/${rootDir}/plugins/
else
# otherwise link the plugin directory itself
ln -s "$plugin" -t $out/${rootDir}/plugins/
fi
done
sed "s|${ide.outPath}|$out|" \
-i $(realpath $out/bin/${meta.mainProgram})
Expand Down

0 comments on commit 579d328

Please sign in to comment.