1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-12 15:47:28 +00:00
nixpkgs/pkgs/applications/editors/sublime/default.nix

41 lines
1.3 KiB
Nix
Raw Normal View History

{ fetchurl, stdenv, glib, xorg, cairo, gtk}:
2012-11-10 19:37:42 +00:00
let
libPath = stdenv.lib.makeLibraryPath [glib xorg.libX11 gtk cairo];
2012-11-10 19:37:42 +00:00
in
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
2012-11-10 19:37:42 +00:00
stdenv.mkDerivation rec {
2013-09-02 19:26:25 +01:00
name = "sublimetext-2.0.2";
src =
if stdenv.system == "i686-linux" then
fetchurl {
2013-09-02 19:26:25 +01:00
name = "sublimetext-2.0.2.tar.bz2";
url = http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2;
sha256 = "026g5mppk28lzzzn9ibykcqkrd5msfmg0sc0z8w8jd7v3h28wcq7";
}
else
fetchurl {
2013-09-02 19:26:25 +01:00
name = "sublimetext-2.0.2.tar.bz2";
url = http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2;
sha256 = "115b71nbv9mv8cz6bkjwpbdf2ywnjc1zy2d3080f6ck4sqqfvfh1";
};
2012-11-10 19:37:42 +00:00
buildCommand = ''
tar xvf ${src}
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
2012-11-10 19:37:42 +00:00
echo ${libPath}
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
2016-04-30 21:56:43 +01:00
--set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
2012-11-10 19:37:42 +00:00
$out/sublime/sublime_text
'';
meta = {
description = "Sophisticated text editor for code, markup and prose";
license = stdenv.lib.licenses.unfree;
2012-11-10 19:37:42 +00:00
};
}