git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #24695 from benley/vscode-1.11.1

vscode: 1.10.2 -> 1.11.1

commit78adf1832f2bec0cb90141202262ca5f7b9a7a30 authorGabriel Ebner <gebner@gebner.org> dateFri 7 Apr 2017, 08:15 (10 years ago) parent1be61d1987cafe
1 file changed+24−21
pkgs/applications/editors/vscode/default.nix+24−21
pkgs/applications/editors/vscode/default.nix+24−21
@@ -1,35 +1,38 @@
11{ stdenv, lib, callPackage, fetchurl, unzip, atomEnv, makeDesktopItem,
2− makeWrapper, libXScrnSaver }:
2+ makeWrapper, libXScrnSaver, libxkbfile }:
33
44let
5− version = "1.10.2";
6− rev = "8076a19fdcab7e1fc1707952d652f0bb6c6db331";
5+ version = "1.11.1";
76 channel = "stable";
87
9− # The revision can be obtained with the following command (see https://github.com/NixOS/nixpkgs/issues/22465):
10− # curl -w "%{url_effective}\n" -I -L -s -S https://vscode-update.azurewebsites.net/latest/linux-x64/stable -o /dev/null
8+ plat = {
9+ "i686-linux" = "linux-ia32";
10+ "x86_64-linux" = "linux-x64";
11+ "x86_64-darwin" = "darwin";
12+ }.${stdenv.system};
1113
12− sha256 = if stdenv.system == "i686-linux" then "1rhwrpv17c8j06qja7i58cggzka8jm9v9h27jy22z30yxjz0p241"
13− else if stdenv.system == "x86_64-linux" then "1c1w7wc39a5vdap8j143ym976p9l9iwns1y28mcgjwrihdlb5wb8"
14− else if stdenv.system == "x86_64-darwin" then "1zznsn84k79lqirzv950q7caq7c88yh2gglwjc11y8k69awmlpva"
15− else throw "Unsupported system: ${stdenv.system}";
14+ sha256 = {
15+ "i686-linux" = "14wdblh7q3m5qdsm34dpg5p7qk6llrbqk60md8wd0fb4chpvrq94";
16+ "x86_64-linux" = "0rmzvaiar3y062mbrggiwjbwxs7izcih5333rn208ax4jxmbk4pc";
17+ "x86_64-darwin" = "1f3zdwsz0l6r7c2k25a7j5m0dl78219jzg4axcmbfa2qcs2hw0x6";
18+ }.${stdenv.system};
1619
17− urlBase = "https://az764295.vo.msecnd.net/${channel}/${rev}/";
20+ archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz";
21+
22+ rpath = lib.concatStringsSep ":" [
23+ atomEnv.libPath
24+ "${lib.makeLibraryPath [libXScrnSaver]}/libXss.so.1"
25+ "${lib.makeLibraryPath [libxkbfile]}/libxkbfile.so.1"
26+ "$out/lib/vscode"
27+ ];
1828
19− urlStr = if stdenv.system == "i686-linux" then
20− urlBase + "code-${channel}-code_${version}-1488982317_i386.tar.gz"
21− else if stdenv.system == "x86_64-linux" then
22− urlBase + "code-${channel}-code_${version}-1488981323_amd64.tar.gz"
23− else if stdenv.system == "x86_64-darwin" then
24− urlBase + "VSCode-darwin-${channel}.zip"
25− else throw "Unsupported system: ${stdenv.system}";
2629in
2730 stdenv.mkDerivation rec {
2831 name = "vscode-${version}";
29− inherit version;
3032
3133 src = fetchurl {
32− url = urlStr;
34+ name = "VSCode_${version}_${plat}.${archive_fmt}";
35+ url = "https://vscode-update.azurewebsites.net/${version}/${plat}/${channel}";
3336 inherit sha256;
3437 };
3538
@@ -45,7 +48,7 @@ in
4548
4649 buildInputs = if stdenv.system == "x86_64-darwin"
4750 then [ unzip makeWrapper libXScrnSaver ]
48− else [ makeWrapper libXScrnSaver ];
51+ else [ makeWrapper libXScrnSaver libxkbfile ];
4952
5053 installPhase =
5154 if stdenv.system == "x86_64-darwin" then ''
@@ -67,7 +70,7 @@ in
6770 postFixup = lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") ''
6871 patchelf \
6972 --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
70− --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [libXScrnSaver]}/libXss.so.1:$out/lib/vscode" \
73+ --set-rpath "${rpath}" \
7174 $out/lib/vscode/code
7275 '';
7376