summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/editors/sublime
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-06-18 16:13:23 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-06-18 22:47:11 +0200
commit48d92c9461c378157de1e1e8049bd1c01b03271c (patch)
tree8f03e18eeaab915d8b55365b8e148b628dfe75a7 /pkgs/applications/editors/sublime
parent7815c86c104a99417db844791dcda34fe7a7965f (diff)
sublime3: remove GTK 2 support
No version in the repo uses it anymore
Diffstat (limited to 'pkgs/applications/editors/sublime')
-rw-r--r--pkgs/applications/editors/sublime/3/common.nix20
1 files changed, 8 insertions, 12 deletions
diff --git a/pkgs/applications/editors/sublime/3/common.nix b/pkgs/applications/editors/sublime/3/common.nix
index 214e53262b5c..0df513cf7963 100644
--- a/pkgs/applications/editors/sublime/3/common.nix
+++ b/pkgs/applications/editors/sublime/3/common.nix
@@ -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