diff --git a/pkgs/applications/editors/sublime/4/common.nix b/pkgs/applications/editors/sublime/4/common.nix index 535475b3d655..be77793c7964 100644 --- a/pkgs/applications/editors/sublime/4/common.nix +++ b/pkgs/applications/editors/sublime/4/common.nix @@ -23,6 +23,7 @@ common-updater-scripts, curl, openssl_1_1, + openssl_3_5, bzip2, sqlite, }: @@ -33,7 +34,7 @@ let binaries = [ "sublime_text" "plugin_host-3.3" - "plugin_host-3.8" + "plugin_host-3.${if lib.versionAtLeast buildVersion "4205" then "14" else "8"}" crashHandlerBinary ]; primaryBinary = "sublime_text"; @@ -90,12 +91,20 @@ let for binary in ${builtins.concatStringsSep " " binaries}; do patchelf \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath ${lib.makeLibraryPath neededLibraries}:${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \ + --set-rpath ${lib.makeLibraryPath neededLibraries}:${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}:$out \ $binary done + # Unable to get plugin_host-3.14 not crash with Python from Nixpkgs + ${lib.optionalString (lib.versionAtLeast buildVersion "4205") "patchelf --set-rpath ${ + lib.makeLibraryPath [ + sqlite + openssl_3_5 + ] + } libpython3.14.so.1.0"} + # Rewrite pkexec argument. Note that we cannot delete bytes in binary. - sed -i -e 's,/bin/cp\x00,cp\x00\x00\x00\x00\x00\x00,g' ${primaryBinary} + ${lib.optionalString (lib.versionOlder buildVersion "4205") "sed -i -e 's,/bin/cp\\x00,cp\\x00\\x00\\x00\\x00\\x00\\x00,g' ${primaryBinary}"} runHook postBuild ''; @@ -106,6 +115,7 @@ let # No need to patch these libraries, it works well with our own rm libcrypto.so.1.1 libssl.so.1.1 ${lib.optionalString (lib.versionAtLeast buildVersion "4145") "rm libsqlite3.so"} + ${lib.optionalString (lib.versionAtLeast buildVersion "4205") "rm libcrypto.so.3 libssl.so.3"} mkdir -p $out cp -r * $out/ @@ -116,7 +126,7 @@ let dontWrapGApps = true; # non-standard location, need to wrap the executables manually postFixup = '' - sed -i 's#/usr/bin/pkexec#pkexec\x00\x00\x00\x00\x00\x00\x00\x00\x00#g' "$out/${primaryBinary}" + ${lib.optionalString (lib.versionOlder buildVersion "4205") "sed -i 's#/usr/bin/pkexec#pkexec\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00#g' \"$out/${primaryBinary}\""} wrapProgram $out/${primaryBinary} \ --set LOCALE_ARCHIVE "${glibcLocales.out}/lib/locale/locale-archive" \ diff --git a/pkgs/applications/editors/sublime/4/packages.nix b/pkgs/applications/editors/sublime/4/packages.nix index 6e2a275f9e36..2b734a8f0c44 100644 --- a/pkgs/applications/editors/sublime/4/packages.nix +++ b/pkgs/applications/editors/sublime/4/packages.nix @@ -11,9 +11,9 @@ in } { }; sublime4-dev = common { - buildVersion = "4199"; + buildVersion = "4205"; dev = true; - x64sha256 = "Nrhwv+ox/SW21c8wZtuX9mzHQ+o9ghsI50dU2kDvCX0="; - aarch64sha256 = "3vCXj53f2Qlt/Ab3hNNng+Y4Ch85Dp0G8srTVBtd6zU="; + x64sha256 = "1Tg8m4FNrVOeHK6VSmlua30pW4Bu7Gz+sT0t/w01UyM="; + aarch64sha256 = "K94UipUVZRh8xJKYW35be0u9L/VHpZ+FYhC26v41b3U="; } { }; }