mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Added SublimeText3 support. SublimeText2 and SublimeText3 can be installed side by side.
They provide 'sublime', 'sublime2' and 'sublime3' commands. SublimeText3 has lower precedense than SublimeText2 because its in beta mode (for over a year now)
This commit is contained in:
parent
1cb628c2e7
commit
c50314dc38
3 changed files with 43 additions and 0 deletions
|
@ -24,6 +24,7 @@ stdenv.mkDerivation rec {
|
|||
mkdir -p $out/bin
|
||||
mv Sublime* $out/sublime
|
||||
ln -s $out/sublime/sublime_text $out/bin/sublime
|
||||
ln -s $out/sublime/sublime_text $out/bin/sublime2
|
||||
|
||||
echo ${libPath}
|
||||
patchelf \
|
||||
|
|
40
pkgs/applications/editors/sublime3/default.nix
Normal file
40
pkgs/applications/editors/sublime3/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ fetchurl, stdenv, glib, xlibs, cairo, gtk, pango}:
|
||||
let
|
||||
libPath = stdenv.lib.makeLibraryPath [glib xlibs.libX11 gtk cairo pango];
|
||||
in
|
||||
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sublimetext3-3.0.59";
|
||||
src =
|
||||
if stdenv.system == "i686-linux" then
|
||||
fetchurl {
|
||||
name = "sublimetext-3.0.59.tar.bz2";
|
||||
url = http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x32.tar.bz2;
|
||||
sha256 = "5ee7b42b5db057108e97b86fd408124fc3f7b56662b2851f59d91f8f0c288088";
|
||||
}
|
||||
else
|
||||
fetchurl {
|
||||
name = "sublimetext-3.0.59.tar.bz2";
|
||||
url = http://c758482.r82.cf2.rackcdn.com/sublime_text_3_build_3059_x64.tar.bz2;
|
||||
sha256 = "da3039687664d33a734cea0151b2291ece9c7f35e5b73df5b2b5eac28a20b972";
|
||||
};
|
||||
buildCommand = ''
|
||||
tar xvf ${src}
|
||||
mkdir -p $out/bin
|
||||
mv sublime_text_3 $out/sublime
|
||||
ln -s $out/sublime/sublime_text $out/bin/sublime
|
||||
ln -s $out/sublime/sublime_text $out/bin/sublime3
|
||||
|
||||
echo ${libPath}
|
||||
patchelf \
|
||||
--interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
|
||||
--set-rpath ${libPath}:${stdenv.gcc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
|
||||
$out/sublime/sublime_text
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Sophisticated text editor for code, markup and prose";
|
||||
license = "unfree";
|
||||
};
|
||||
}
|
|
@ -8744,6 +8744,8 @@ let
|
|||
stumpwm = lispPackages.stumpwm;
|
||||
|
||||
sublime = callPackage ../applications/editors/sublime { };
|
||||
|
||||
sublime3 = lowPrio (callPackage ../applications/editors/sublime3 { });
|
||||
|
||||
subversion = callPackage ../applications/version-management/subversion/default.nix {
|
||||
bdbSupport = true;
|
||||
|
|
Loading…
Reference in a new issue