mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 08:59:32 +03:00
sublime3: remove GTK 2 support
No version in the repo uses it anymore
This commit is contained in:
parent
7815c86c10
commit
48d92c9461
@ -1,13 +1,11 @@
|
||||
{ buildVersion, x32sha256, x64sha256, dev ? false }:
|
||||
|
||||
{ fetchurl, stdenv, xorg, glib, glibcLocales, gtk2, gtk3, cairo, pango, libredirect, makeWrapper, wrapGAppsHook
|
||||
, pkexecPath ? "/run/wrappers/bin/pkexec", gksuSupport ? false, gksu
|
||||
{ fetchurl, stdenv, xorg, glib, glibcLocales, gtk3, cairo, pango, libredirect, makeWrapper, wrapGAppsHook
|
||||
, pkexecPath ? "/run/wrappers/bin/pkexec"
|
||||
, writeScript, common-updater-scripts, curl, gnugrep
|
||||
, openssl, bzip2, bash, unzip, zip
|
||||
}:
|
||||
|
||||
assert gksuSupport -> gksu != null;
|
||||
|
||||
let
|
||||
pname = "sublimetext3";
|
||||
packageAttribute = "sublime3${stdenv.lib.optionalString dev "-dev"}";
|
||||
@ -18,7 +16,6 @@ let
|
||||
downloadArchiveType = "tar.bz2";
|
||||
versionUrl = "https://www.sublimetext.com/${if dev then "3dev" else "3"}";
|
||||
versionFile = "pkgs/applications/editors/sublime/3/packages.nix";
|
||||
usesGtk2 = stdenv.lib.versionOlder buildVersion "3181";
|
||||
archSha256 =
|
||||
if stdenv.hostPlatform.system == "i686-linux" then
|
||||
x32sha256
|
||||
@ -30,9 +27,8 @@ let
|
||||
else
|
||||
"x64";
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath [ xorg.libX11 glib (if usesGtk2 then gtk2 else gtk3) cairo pango ];
|
||||
redirects = [ "/usr/bin/pkexec=${pkexecPath}" ]
|
||||
++ stdenv.lib.optional gksuSupport "/usr/bin/gksudo=${gksu}/bin/gksudo";
|
||||
libPath = stdenv.lib.makeLibraryPath [ xorg.libX11 glib gtk3 cairo pango ];
|
||||
redirects = [ "/usr/bin/pkexec=${pkexecPath}" ];
|
||||
in let
|
||||
binaryPackage = stdenv.mkDerivation {
|
||||
pname = "${pname}-bin";
|
||||
@ -46,8 +42,8 @@ in let
|
||||
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
buildInputs = stdenv.lib.optionals (!usesGtk2) [ glib gtk3 ]; # for GSETTINGS_SCHEMAS_PATH
|
||||
nativeBuildInputs = [ zip unzip makeWrapper ] ++ stdenv.lib.optional (!usesGtk2) wrapGAppsHook;
|
||||
buildInputs = [ glib gtk3 ]; # for GSETTINGS_SCHEMAS_PATH
|
||||
nativeBuildInputs = [ zip unzip makeWrapper wrapGAppsHook ];
|
||||
|
||||
# make exec.py in Default.sublime-package use own bash with an LD_PRELOAD instead of "/bin/bash"
|
||||
patchPhase = ''
|
||||
@ -76,7 +72,7 @@ in let
|
||||
$binary
|
||||
done
|
||||
|
||||
# Rewrite pkexec|gksudo argument. Note that we can't delete bytes in binary.
|
||||
# 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}
|
||||
|
||||
runHook postBuild
|
||||
@ -105,7 +101,7 @@ in let
|
||||
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
||||
--set NIX_REDIRECTS ${builtins.concatStringsSep ":" redirects} \
|
||||
--set LOCALE_ARCHIVE "${glibcLocales.out}/lib/locale/locale-archive" \
|
||||
${stdenv.lib.optionalString (!usesGtk2) ''"''${gappsWrapperArgs[@]}"''}
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
|
||||
# Without this, plugin_host crashes, even though it has the rpath
|
||||
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl.out}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
|
||||
|
Loading…
Reference in New Issue
Block a user