sublime4-dev: 4141 → 4147

This commit is contained in:
Jan Tojnar 2023-01-15 20:34:30 +01:00
parent a21493d40d
commit faa2508ddd
2 changed files with 19 additions and 5 deletions

View File

@ -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/

View File

@ -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=";
} {};
}