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 { fetchurl, stdenv, lib, xorg, glib, libglvnd, glibcLocales, gtk3, cairo, pango, makeWrapper, wrapGAppsHook
, writeShellScript, common-updater-scripts, curl , writeShellScript, common-updater-scripts, curl
, openssl_1_1, bzip2, bash, unzip, zip , openssl_1_1, bzip2, bash, unzip, zip
, sqlite
}: }:
let let
@ -15,7 +16,19 @@ let
versionUrl = "https://download.sublimetext.com/latest/${if dev then "dev" else "stable"}"; versionUrl = "https://download.sublimetext.com/latest/${if dev then "dev" else "stable"}";
versionFile = builtins.toString ./packages.nix; 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 in let
binaryPackage = stdenv.mkDerivation rec { binaryPackage = stdenv.mkDerivation rec {
pname = "${pnameBase}-bin"; pname = "${pnameBase}-bin";
@ -52,7 +65,7 @@ in let
for binary in ${ builtins.concatStringsSep " " binaries }; do for binary in ${ builtins.concatStringsSep " " binaries }; do
patchelf \ patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --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 $binary
done done
@ -67,6 +80,7 @@ in let
# No need to patch these libraries, it works well with our own # No need to patch these libraries, it works well with our own
rm libcrypto.so.1.1 libssl.so.1.1 rm libcrypto.so.1.1 libssl.so.1.1
${lib.optionalString (lib.versionAtLeast buildVersion "4145") "rm libsqlite3.so"}
mkdir -p $out mkdir -p $out
cp -r * $out/ cp -r * $out/

View file

@ -11,9 +11,9 @@ in
} {}; } {};
sublime4-dev = common { sublime4-dev = common {
buildVersion = "4141"; buildVersion = "4147";
dev = true; dev = true;
x64sha256 = "eFo9v4hSrp1gV56adVyFB9sOApOXlKNvVBW0wbFYG4g="; x64sha256 = "9zs+2cp+pid0y/v5tHJN4jp7sM1oGB5EgGzMASL3y4o=";
aarch64sha256 = "MmwSptvSH507+X9GT8GC4tzZFzEfT2pKc+/Qu5SbMkM="; aarch64sha256 = "KyvHJPqBEfeQQJnuyWZA7vGhWkYFqMaTMx+uy+3cZ30=";
} {}; } {};
} }