Commit de09e1f7 authored by zlepper's avatar zlepper Committed by Masum Reza
Browse files

jetbrains.*: Don't remove shell scripts, they are invoked by JetBrains Gateway

parent 767dce35
Loading
Loading
Loading
Loading
+34 −24
Original line number Diff line number Diff line
@@ -119,13 +119,17 @@ lib.makeOverridable mkDerivation (
      jdk=${jdk.home}
      item=${desktopItem}

      launcher="$out/$pname/bin/${loName}"
      if [ -e "$launcher" ]; then
        rm "$launcher".sh # We do not wrap the old script-style launcher anymore.
      else
        launcher+=.sh
      needsWrapping=()

      if [ -f "$out/$pname/bin/${loName}" ]; then
        needsWrapping+=("$out/$pname/bin/${loName}")
      fi
      if [ -f "$out/$pname/bin/${loName}.sh" ]; then
        needsWrapping+=("$out/$pname/bin/${loName}.sh")
      fi

      for launcher in "''${needsWrapping[@]}"
      do
        wrapProgram  "$launcher" \
          --prefix PATH : "${
            lib.makeBinPath [
@@ -146,6 +150,12 @@ lib.makeOverridable mkDerivation (
          --set-default ${hiName}_JDK "$jdk" \
          --set-default LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive" \
          --set-default ${vmoptsIDE}_VM_OPTIONS ${vmoptsFile}
      done

      launcher="$out/$pname/bin/${loName}"
      if [ ! -e "$launcher" ]; then
        launcher+=.sh
      fi

      ln -s "$launcher" $out/bin/$pname
      rm -rf $out/$pname/plugins/remote-dev-server/selfcontained/