about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2023-01-15 20:34:30 +0100
committerJan Tojnar <jtojnar@gmail.com>2023-01-15 21:46:08 +0100
commitfaa2508dddf17492063e29a93d38489ac086e508 (patch)
tree891069e70cc9dd12cbfdab4fb53429a29554eb67 /pkgs/applications
parenta21493d40d8e121bd3053e445e8c8e44ab66887f (diff)
sublime4-dev: 4141 → 4147
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/sublime/4/common.nix18
-rw-r--r--pkgs/applications/editors/sublime/4/packages.nix6
2 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/applications/editors/sublime/4/common.nix b/pkgs/applications/editors/sublime/4/common.nix
index ebf6cc2c53e19..7a8cc75e540b3 100644
--- a/pkgs/applications/editors/sublime/4/common.nix
+++ b/pkgs/applications/editors/sublime/4/common.nix
@@ -3,6 +3,7 @@
 { fetchurl, stdenv, lib, xorg, glib, libglvnd, glibcLocales, gtk3, cairo, pango, makeWrapper, wrapGAppsHook
 , writeShellScript, common-updater-scripts, curl
 , openssl_1_1, bzip2, bash, unzip, zip
+, sqlite
 }:
 
 let
@@ -15,7 +16,19 @@ let
   versionUrl = "https://download.sublimetext.com/latest/${if dev then "dev" else "stable"}";
   versionFile = builtins.toString ./packages.nix;
 
-  libPath = lib.makeLibraryPath [ xorg.libX11 xorg.libXtst glib libglvnd openssl_1_1 gtk3 cairo pango curl ];
+  neededLibraries = [
+    xorg.libX11
+    xorg.libXtst
+    glib
+    libglvnd
+    openssl_1_1
+    gtk3
+    cairo
+    pango
+    curl
+  ] ++ lib.optionals (lib.versionAtLeast buildVersion "4145") [
+    sqlite
+  ];
 in let
   binaryPackage = stdenv.mkDerivation rec {
     pname = "${pnameBase}-bin";
@@ -52,7 +65,7 @@ in let
       for binary in ${ builtins.concatStringsSep " " binaries }; do
         patchelf \
           --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-          --set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \
+          --set-rpath ${lib.makeLibraryPath neededLibraries}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.is64bit "64"} \
           $binary
       done
 
@@ -67,6 +80,7 @@ in 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"}
 
       mkdir -p $out
       cp -r * $out/
diff --git a/pkgs/applications/editors/sublime/4/packages.nix b/pkgs/applications/editors/sublime/4/packages.nix
index d5a37aee5a473..5a60ce185c12c 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 = "4141";
+      buildVersion = "4147";
       dev = true;
-      x64sha256 = "eFo9v4hSrp1gV56adVyFB9sOApOXlKNvVBW0wbFYG4g=";
-      aarch64sha256 = "MmwSptvSH507+X9GT8GC4tzZFzEfT2pKc+/Qu5SbMkM=";
+      x64sha256 = "9zs+2cp+pid0y/v5tHJN4jp7sM1oGB5EgGzMASL3y4o=";
+      aarch64sha256 = "KyvHJPqBEfeQQJnuyWZA7vGhWkYFqMaTMx+uy+3cZ30=";
     } {};
   }