101 lines
3.0 KiB
Nix
101 lines
3.0 KiB
Nix
{ lib, stdenv, makeDesktopItem, makeWrapper, fetchurl
|
|
, atomEnv, at-spi2-atk, at-spi2-core, autoPatchelfHook, alsa-lib
|
|
, mesa, nss, nspr, systemd, libdrm, libxkbcommon, libX11, libXcomposite
|
|
, libXdamage, libXext, libXfixes, libXrandr, expat, libxcb
|
|
, libXScrnSaver, libXi, libxshmfence, libGL, libglvnd
|
|
, gtk3, pango, cairo, gdk-pixbuf, glib, dbus, cups, SDL2
|
|
, libav_0_8, openssl, bash, findutils, xdg-utils, coreutils
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "vscode-insiders";
|
|
# version = "1.98.2-1708777035";
|
|
version = "1.98.2";
|
|
|
|
src = fetchurl {
|
|
# url = "https://az764295.vo.msecnd.net/insider/9319989589821514c6d3dea07e90292d59431d35/code-insider-${version}-linux-x64.tar.gz";
|
|
# url = "https://az764295.vo.msecnd.net/insider/2bdf282f0aa8f3022a0540949724ccf8a909ec45/code-insider-${version}-linux-x64.tar.gz";
|
|
url = "https://update.code.visualstudio.com/${version}/linux-x64/stable";
|
|
hash = "sha256-Mm34T2/laoqxN8MR+H0rHxxA0WAKgc5d/ZvGGC+ETok=";
|
|
};
|
|
|
|
buildInputs = [
|
|
atomEnv.packages
|
|
at-spi2-atk
|
|
at-spi2-core
|
|
alsa-lib
|
|
mesa
|
|
nss
|
|
nspr
|
|
systemd
|
|
libdrm
|
|
libxkbcommon
|
|
libX11
|
|
libXcomposite
|
|
libXdamage
|
|
libXext
|
|
libXfixes
|
|
libXrandr
|
|
expat
|
|
libxcb
|
|
libXScrnSaver
|
|
libXi
|
|
libxshmfence
|
|
libGL
|
|
libglvnd
|
|
gtk3
|
|
pango
|
|
cairo
|
|
gdk-pixbuf
|
|
glib
|
|
dbus
|
|
cups
|
|
SDL2
|
|
libav_0_8
|
|
openssl
|
|
];
|
|
|
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/vscode-insiders
|
|
cp -r . $out/lib/vscode-insiders
|
|
|
|
mkdir -p $out/bin
|
|
ln -s $out/lib/vscode-insiders/bin/code-insiders $out/bin/code-insiders
|
|
|
|
mkdir -p $out/share/applications
|
|
cp ${makeDesktopItem {
|
|
name = "code-insiders";
|
|
desktopName = "Visual Studio Code - Insiders";
|
|
comment = "Code Editing. Redefined.";
|
|
exec = "code-insiders %F";
|
|
icon = "code-insiders";
|
|
categories = [ "Utility" "TextEditor" "Development" "IDE" ];
|
|
mimeTypes = [ "text/plain" "inode/directory" ];
|
|
startupNotify = true;
|
|
startupWMClass = "Code - Insiders";
|
|
}}/share/applications/code-insiders.desktop $out/share/applications/
|
|
|
|
mkdir -p $out/share/pixmaps
|
|
cp $out/lib/vscode-insiders/resources/app/resources/linux/code-insiders.png $out/share/pixmaps/
|
|
'';
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/code-insiders \
|
|
--prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Visual Studio Code Insiders - Open Source IDE by Microsoft";
|
|
longDescription = ''
|
|
Visual Studio Code Insiders is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. This is the insiders version, updated daily with the latest changes.
|
|
'';
|
|
homepage = "https://code.visualstudio.com/insiders";
|
|
license = licenses.unfree;
|
|
maintainers = with maintainers; [ ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|