jetbrains: fix mismatched versions for source-built packages (#364259)
This commit is contained in:
@@ -91,8 +91,9 @@ let
|
|||||||
url = products."${pname}".url;
|
url = products."${pname}".url;
|
||||||
sha256 = products."${pname}".sha256;
|
sha256 = products."${pname}".sha256;
|
||||||
};
|
};
|
||||||
inherit (products."${pname}") version;
|
version = if fromSource then communitySources."${pname}".version else products."${pname}".version;
|
||||||
buildNumber = products."${pname}".build_number;
|
buildNumber =
|
||||||
|
if fromSource then communitySources."${pname}".buildNumber else products."${pname}".build_number;
|
||||||
inherit (ideInfo."${pname}") wmClass product;
|
inherit (ideInfo."${pname}") wmClass product;
|
||||||
productShort = ideInfo."${pname}".productShort or ideInfo."${pname}".product;
|
productShort = ideInfo."${pname}".productShort or ideInfo."${pname}".product;
|
||||||
meta = mkMeta ideInfo."${pname}".meta fromSource;
|
meta = mkMeta ideInfo."${pname}".meta fromSource;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ To test the build process of every IDE (as well as the process for adding plugin
|
|||||||
- Source builds need a bit more effort, as they **aren't automated at the moment**:
|
- Source builds need a bit more effort, as they **aren't automated at the moment**:
|
||||||
- Find the build of the stable release you want to target (usually different for pycharm and idea, should have three components)
|
- Find the build of the stable release you want to target (usually different for pycharm and idea, should have three components)
|
||||||
- I find this at https://jetbrains.com/updates/updates.xml (search for `product name="`, then `fullNumber`)
|
- I find this at https://jetbrains.com/updates/updates.xml (search for `product name="`, then `fullNumber`)
|
||||||
- Update the `buildVer` field in source/default.nix
|
- Update the `version` & `buildNumber` fields in source/default.nix
|
||||||
- Empty the `ideaHash`, `androidHash`, `jpsHash` and `restarterHash` (only `ideaHash` and `restarterHash` changes on a regular basis) fields and try to build to get the new hashes
|
- Empty the `ideaHash`, `androidHash`, `jpsHash` and `restarterHash` (only `ideaHash` and `restarterHash` changes on a regular basis) fields and try to build to get the new hashes
|
||||||
- Run `nix build .#jetbrains.(idea/pycharm)-community-src.src.src`, then `./source/build_maven.py source/idea_maven_artefacts.json result/`
|
- Run `nix build .#jetbrains.(idea/pycharm)-community-src.src.src`, then `./source/build_maven.py source/idea_maven_artefacts.json result/`
|
||||||
- Update `source/brokenPlugins.json` (from https://plugins.jetbrains.com/files/brokenPlugins.json)
|
- Update `source/brokenPlugins.json` (from https://plugins.jetbrains.com/files/brokenPlugins.json)
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
, pkg-config
|
, pkg-config
|
||||||
, xorg
|
, xorg
|
||||||
|
|
||||||
, buildVer
|
, version
|
||||||
|
, buildNumber
|
||||||
, buildType
|
, buildType
|
||||||
, ideaHash
|
, ideaHash
|
||||||
, androidHash
|
, androidHash
|
||||||
@@ -35,14 +36,14 @@ let
|
|||||||
ideaSrc = fetchFromGitHub {
|
ideaSrc = fetchFromGitHub {
|
||||||
owner = "jetbrains";
|
owner = "jetbrains";
|
||||||
repo = "intellij-community";
|
repo = "intellij-community";
|
||||||
rev = "${buildType}/${buildVer}";
|
rev = "${buildType}/${buildNumber}";
|
||||||
hash = ideaHash;
|
hash = ideaHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
androidSrc = fetchFromGitHub {
|
androidSrc = fetchFromGitHub {
|
||||||
owner = "jetbrains";
|
owner = "jetbrains";
|
||||||
repo = "android";
|
repo = "android";
|
||||||
rev = "${buildType}/${buildVer}";
|
rev = "${buildType}/${buildNumber}";
|
||||||
hash = androidHash;
|
hash = androidHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -75,7 +76,7 @@ let
|
|||||||
|
|
||||||
libdbm = stdenv.mkDerivation {
|
libdbm = stdenv.mkDerivation {
|
||||||
pname = "libdbm";
|
pname = "libdbm";
|
||||||
version = buildVer;
|
version = buildNumber;
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
buildInputs = [ glib xorg.libX11 libdbusmenu ];
|
buildInputs = [ glib xorg.libX11 libdbusmenu ];
|
||||||
inherit src;
|
inherit src;
|
||||||
@@ -95,12 +96,12 @@ let
|
|||||||
|
|
||||||
fsnotifier = stdenv.mkDerivation {
|
fsnotifier = stdenv.mkDerivation {
|
||||||
pname = "fsnotifier";
|
pname = "fsnotifier";
|
||||||
version = buildVer;
|
version = buildNumber;
|
||||||
inherit src;
|
inherit src;
|
||||||
sourceRoot = "${src.name}/native/fsNotifier/linux";
|
sourceRoot = "${src.name}/native/fsNotifier/linux";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
$CC -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"${buildVer}\"" -std=c11 main.c inotify.c util.c -o fsnotifier
|
$CC -O2 -Wall -Wextra -Wpedantic -D "VERSION=\"${buildNumber}\"" -std=c11 main.c inotify.c util.c -o fsnotifier
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@@ -113,7 +114,7 @@ let
|
|||||||
|
|
||||||
restarter = rustPlatform.buildRustPackage {
|
restarter = rustPlatform.buildRustPackage {
|
||||||
pname = "restarter";
|
pname = "restarter";
|
||||||
version = buildVer;
|
version = buildNumber;
|
||||||
inherit src;
|
inherit src;
|
||||||
sourceRoot = "${src.name}/native/restarter";
|
sourceRoot = "${src.name}/native/restarter";
|
||||||
cargoHash = restarterHash;
|
cargoHash = restarterHash;
|
||||||
@@ -136,7 +137,7 @@ let
|
|||||||
|
|
||||||
jps-bootstrap = stdenvNoCC.mkDerivation {
|
jps-bootstrap = stdenvNoCC.mkDerivation {
|
||||||
pname = "jps-bootstrap";
|
pname = "jps-bootstrap";
|
||||||
version = buildVer;
|
version = buildNumber;
|
||||||
inherit src;
|
inherit src;
|
||||||
sourceRoot = "${src.name}/platform/jps-bootstrap";
|
sourceRoot = "${src.name}/platform/jps-bootstrap";
|
||||||
nativeBuildInputs = [ ant makeWrapper jbr ];
|
nativeBuildInputs = [ ant makeWrapper jbr ];
|
||||||
@@ -200,7 +201,7 @@ let
|
|||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "${buildType}-community";
|
pname = "${buildType}-community";
|
||||||
version = buildVer;
|
inherit version buildNumber;
|
||||||
name = "${pname}-${version}.tar.gz";
|
name = "${pname}-${version}.tar.gz";
|
||||||
inherit src;
|
inherit src;
|
||||||
nativeBuildInputs = [ p7zip jbr jps-bootstrap ];
|
nativeBuildInputs = [ p7zip jbr jps-bootstrap ];
|
||||||
@@ -230,7 +231,7 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
-e 's|MAVEN_REPO_HERE|${mvnRepo}/.m2/repository/|' \
|
-e 's|MAVEN_REPO_HERE|${mvnRepo}/.m2/repository/|' \
|
||||||
-e 's|MAVEN_PATH_HERE|${maven}/maven|' \
|
-e 's|MAVEN_PATH_HERE|${maven}/maven|' \
|
||||||
-i build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
|
-i build/deps/src/org/jetbrains/intellij/build/impl/BundledMavenDownloader.kt
|
||||||
echo '${buildVer}.SNAPSHOT' > build.txt
|
echo '${buildNumber}.SNAPSHOT' > build.txt
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
@@ -239,7 +240,7 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
ln -s "$repo"/.m2 /build/.m2
|
ln -s "$repo"/.m2 /build/.m2
|
||||||
export JPS_BOOTSTRAP_COMMUNITY_HOME=/build/source
|
export JPS_BOOTSTRAP_COMMUNITY_HOME=/build/source
|
||||||
jps-bootstrap \
|
jps-bootstrap \
|
||||||
-Dbuild.number=${buildVer} \
|
-Dbuild.number=${buildNumber} \
|
||||||
-Djps.kotlin.home=${kotlin} \
|
-Djps.kotlin.home=${kotlin} \
|
||||||
-Dintellij.build.target.os=linux \
|
-Dintellij.build.target.os=linux \
|
||||||
-Dintellij.build.target.arch=x64 \
|
-Dintellij.build.target.arch=x64 \
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
idea-community = callPackage ./build.nix {
|
idea-community = callPackage ./build.nix {
|
||||||
buildVer = "241.17890.1";
|
version = "2024.1.3";
|
||||||
|
buildNumber = "241.17890.1";
|
||||||
buildType = "idea";
|
buildType = "idea";
|
||||||
ideaHash = "sha256-jWFnewxRkriSmV6CgGX1r//uaErMINfx3Z+JpkE34jk=";
|
ideaHash = "sha256-jWFnewxRkriSmV6CgGX1r//uaErMINfx3Z+JpkE34jk=";
|
||||||
androidHash = "sha256-hX2YdRYNRg0guskNiYfxdl9osgZojRen82IhgA6G0Eo=";
|
androidHash = "sha256-hX2YdRYNRg0guskNiYfxdl9osgZojRen82IhgA6G0Eo=";
|
||||||
@@ -12,7 +13,8 @@
|
|||||||
mvnDeps = ./idea_maven_artefacts.json;
|
mvnDeps = ./idea_maven_artefacts.json;
|
||||||
};
|
};
|
||||||
pycharm-community = callPackage ./build.nix {
|
pycharm-community = callPackage ./build.nix {
|
||||||
buildVer = "241.17890.14";
|
version = "2024.1.3";
|
||||||
|
buildNumber = "241.17890.14";
|
||||||
buildType = "pycharm";
|
buildType = "pycharm";
|
||||||
ideaHash = "sha256-tTB91/RHEWP/ZILPNFAbolVBLvgjLXTdD/uF/pdJ22Y=";
|
ideaHash = "sha256-tTB91/RHEWP/ZILPNFAbolVBLvgjLXTdD/uF/pdJ22Y=";
|
||||||
androidHash = "sha256-hX2YdRYNRg0guskNiYfxdl9osgZojRen82IhgA6G0Eo=";
|
androidHash = "sha256-hX2YdRYNRg0guskNiYfxdl9osgZojRen82IhgA6G0Eo=";
|
||||||
|
|||||||
Reference in New Issue
Block a user