about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/jetbrains/patches
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/jetbrains/patches')
-rw-r--r--nixpkgs/pkgs/applications/editors/jetbrains/patches/disable-sbom-generation.patch11
-rw-r--r--nixpkgs/pkgs/applications/editors/jetbrains/patches/no-download.patch45
-rw-r--r--nixpkgs/pkgs/applications/editors/jetbrains/patches/pycharm-build-fix.patch41
-rw-r--r--nixpkgs/pkgs/applications/editors/jetbrains/patches/restarter-no-static-crt-override.patch9
4 files changed, 55 insertions, 51 deletions
diff --git a/nixpkgs/pkgs/applications/editors/jetbrains/patches/disable-sbom-generation.patch b/nixpkgs/pkgs/applications/editors/jetbrains/patches/disable-sbom-generation.patch
new file mode 100644
index 000000000000..ad7942cd9c1c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/editors/jetbrains/patches/disable-sbom-generation.patch
@@ -0,0 +1,11 @@
+--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt
++++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/sbom/SoftwareBillOfMaterialsImpl.kt
+@@ -162,6 +162,8 @@
+   }
+ 
+   override suspend fun generate() {
++    Span.current().addEvent("SBOM generation are unavaliable due to requiring internet, skipping")
++    return
+     val skipReason = when {
+       !context.shouldBuildDistributions() -> "No distribution was built"
+       documentNamespace == null -> "Document namespace isn't specified"
diff --git a/nixpkgs/pkgs/applications/editors/jetbrains/patches/no-download.patch b/nixpkgs/pkgs/applications/editors/jetbrains/patches/no-download.patch
index 4e3c4cd33725..f82d8c04016c 100644
--- a/nixpkgs/pkgs/applications/editors/jetbrains/patches/no-download.patch
+++ b/nixpkgs/pkgs/applications/editors/jetbrains/patches/no-download.patch
@@ -39,6 +39,17 @@
 +    return Path.of("MAVEN_PATH_HERE")
    }
  }
+--- a/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/BuildDependenciesDownloader.kt
++++ b/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/BuildDependenciesDownloader.kt
+@@ -70,7 +70,7 @@
+                              version: String,
+                              classifier: String?,
+                              packaging: String): URI {
+-    val base = mavenRepository.trim('/')
++    val base = mavenRepository.trimEnd('/')
+     val groupStr = groupId.replace('.', '/')
+     val classifierStr = if (classifier != null) "-${classifier}" else ""
+     return URI.create("${base}/${groupStr}/${artifactId}/${version}/${artifactId}-${version}${classifierStr}.${packaging}")
 --- a/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
 +++ b/platform/build-scripts/downloader/src/org/jetbrains/intellij/build/dependencies/JdkDownloader.kt
 @@ -25,11 +25,7 @@
@@ -56,21 +67,35 @@
        jdkExtracted.resolve("Contents").resolve("Home")
 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt
 +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/LinuxDistributionCustomizer.kt
-@@ -43,12 +43,12 @@
+@@ -46,7 +46,7 @@
    /**
-    * If `true` a separate *-no-jbr.tar.gz artifact without runtime will be produced.
+    * If `true`, a separate *[org.jetbrains.intellij.build.impl.LinuxDistributionBuilder.NO_RUNTIME_SUFFIX].tar.gz artifact without a runtime will be produced.
     */
--  var buildTarGzWithoutBundledRuntime = false
-+  var buildTarGzWithoutBundledRuntime = true
- 
-   /**
-    * If `true`, the only *-no-jbr.tar.gz will be produced, no other binaries for Linux will be built.
-    */
--  var buildOnlyBareTarGz = false
-+  var buildOnlyBareTarGz = true
+-  var buildArtifactWithoutRuntime = false
++  var buildArtifactWithoutRuntime = true
  
    /**
     * Set both properties if a .snap package should be produced.
+--- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt
++++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/LinuxDistributionBuilder.kt
+@@ -45,7 +45,7 @@
+       withContext(Dispatchers.IO) {
+         val distBinDir = targetPath.resolve("bin")
+         val sourceBinDir = context.paths.communityHomeDir.resolve("bin/linux")
+-        copyFileToDir(NativeBinaryDownloader.downloadRestarter(context = context, os = OsFamily.LINUX, arch = arch), distBinDir)
++        copyFileToDir(sourceBinDir.resolve("${arch.dirName}/restarter"), distBinDir)
+         copyFileToDir(sourceBinDir.resolve("${arch.dirName}/fsnotifier"), distBinDir)
+         copyFileToDir(sourceBinDir.resolve("${arch.dirName}/libdbm.so"), distBinDir)
+         generateBuildTxt(context, targetPath)
+@@ -85,6 +85,8 @@
+         }
+       }
+ 
++      return@executeStep
++
+       val runtimeDir = context.bundledRuntime.extract(os = OsFamily.LINUX, arch = arch)
+       updateExecutablePermissions(runtimeDir, executableFileMatchers)
+       val tarGzPath = buildTarGz(arch = arch, runtimeDir = runtimeDir, unixDistPath = osAndArchSpecificDistPath, suffix = suffix(arch))
 --- a/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
 +++ b/platform/build-scripts/src/org/jetbrains/intellij/build/impl/brokenPlugins.kt
 @@ -11,6 +11,7 @@
diff --git a/nixpkgs/pkgs/applications/editors/jetbrains/patches/pycharm-build-fix.patch b/nixpkgs/pkgs/applications/editors/jetbrains/patches/pycharm-build-fix.patch
deleted file mode 100644
index f10187637822..000000000000
--- a/nixpkgs/pkgs/applications/editors/jetbrains/patches/pycharm-build-fix.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/python/build/src/PyCharmCommunityInstallersBuildTarget.kt
-+++ b/python/build/src/PyCharmCommunityInstallersBuildTarget.kt
-@@ -2,9 +2,11 @@
- 
- import kotlinx.coroutines.Dispatchers
- import kotlinx.coroutines.runBlocking
-+import org.jetbrains.intellij.build.BuildOptions
- import org.jetbrains.intellij.build.BuildTasks
- import org.jetbrains.intellij.build.IdeaProjectLoaderUtil
- import org.jetbrains.intellij.build.impl.BuildContextImpl
-+import org.jetbrains.intellij.build.pycharm.PyCharmBuildUtils
- import org.jetbrains.intellij.build.pycharm.PyCharmCommunityProperties
- 
- // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
-@@ -12,13 +14,26 @@
-   @JvmStatic
-   fun main(args: Array<String>) {
-     runBlocking(Dispatchers.Default) {
-+      val options = BuildOptions().apply {
-+        // we cannot provide consistent build number for PyCharm Community if it's built separately so use *.SNAPSHOT number to avoid confusion
-+        buildNumber = null
-+
-+        // do not bother external users about clean/incremental
-+        // just remove out/ directory for clean build
-+        incrementalCompilation = true
-+        useCompiledClassesFromProjectOutput = false
-+        buildStepsToSkip.addAll(listOf(
-+          BuildOptions.MAC_SIGN_STEP,
-+        ))
-+      }
-       val communityHome = IdeaProjectLoaderUtil.guessCommunityHome(javaClass)
-       val context = BuildContextImpl.createContext(
-         communityHome = communityHome,
-         projectHome = communityHome.communityRoot,
-         productProperties = PyCharmCommunityProperties(communityHome.communityRoot),
-+        options = options,
-       )
-       BuildTasks.create(context).buildDistributions()
-     }
-   }
- }
diff --git a/nixpkgs/pkgs/applications/editors/jetbrains/patches/restarter-no-static-crt-override.patch b/nixpkgs/pkgs/applications/editors/jetbrains/patches/restarter-no-static-crt-override.patch
new file mode 100644
index 000000000000..cbc0405eee82
--- /dev/null
+++ b/nixpkgs/pkgs/applications/editors/jetbrains/patches/restarter-no-static-crt-override.patch
@@ -0,0 +1,9 @@
+--- a/.cargo/config.toml
++++ b/.cargo/config.toml
+@@ -3,6 +3,3 @@
+ 

+ [target.'cfg(all(target_os = "macos", target_arch = "x86_64"))']

+ rustflags = ["-C", "link-arg=-mmacosx-version-min=10.15"]

+-

+-[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))']

+-rustflags = ["-C", "target-feature=+crt-static"]