tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
sublimetext3: add .desktop entry & icon
codyopel
11 years ago
ee8e97d8
bee0ccd1
+12
-3
1 changed file
expand all
collapse all
unified
split
pkgs
applications
editors
sublime3
default.nix
+12
-3
pkgs/applications/editors/sublime3/default.nix
···
38
'';
39
40
installPhase = ''
0
0
0
41
mkdir -p $out
42
cp -prvd * $out/
0
43
# Without this, plugin_host crashes, even though it has the rpath
44
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so
45
'';
···
52
mkdir -p $out/bin
53
ln -s ${sublime}/sublime_text $out/bin/sublime
54
ln -s ${sublime}/sublime_text $out/bin/sublime3
0
0
0
55
'';
56
57
-
meta = {
58
description = "Sophisticated text editor for code, markup and prose";
59
-
maintainers = [ stdenv.lib.maintainers.wmertens ];
60
-
license = stdenv.lib.licenses.unfree;
0
0
61
};
62
}
···
38
'';
39
40
installPhase = ''
41
+
# Correct sublime_text.desktop to exec `sublime' instead of /opt/sublime_text
42
+
sed -e 's,/opt/sublime_text/sublime_text,sublime,' -i sublime_text.desktop
43
+
44
mkdir -p $out
45
cp -prvd * $out/
46
+
47
# Without this, plugin_host crashes, even though it has the rpath
48
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so
49
'';
···
56
mkdir -p $out/bin
57
ln -s ${sublime}/sublime_text $out/bin/sublime
58
ln -s ${sublime}/sublime_text $out/bin/sublime3
59
+
mkdir -p $out/share/applications
60
+
ln -s ${sublime}/sublime_text.desktop $out/share/applications/sublime_text.desktop
61
+
ln -s ${sublime}/Icon/256x256/ $out/share/icons
62
'';
63
64
+
meta = with stdenv.lib; {
65
description = "Sophisticated text editor for code, markup and prose";
66
+
homepage = https://www.sublimetext.com/;
67
+
maintainers = with maintainers; [ wmertens ];
68
+
license = licenses.unfree;
69
+
platforms = platforms.linux;
70
};
71
}