Merge remote-tracking branch 'channels/nixos-unstable' into rust-analyzer

This commit is contained in:
oxalica
2020-04-08 14:22:56 +08:00
2773 changed files with 79776 additions and 42335 deletions
+20 -13
View File
@@ -1,18 +1,18 @@
{ lib, stdenv, fetchurl, vscode-utils, extractNuGet
, icu, curl, openssl, lttng-ust, autoPatchelfHook
, pythonUseFixed ? false, python # When `true`, the python default setting will be fixed to specified.
# Use version from `PATH` for default setting otherwise.
# Defaults to `false` as we expect it to be project specific most of the time.
, ctagsUseFixed ? true, ctags # When `true`, the ctags default setting will be fixed to specified.
# Use version from `PATH` for default setting otherwise.
# Defaults to `true` as usually not defined on a per projet basis.
, python3
, pythonUseFixed ? false # When `true`, the python default setting will be fixed to specified.
# Use version from `PATH` for default setting otherwise.
# Defaults to `false` as we expect it to be project specific most of the time.
, ctagsUseFixed ? true, ctags # When `true`, the ctags default setting will be fixed to specified.
# Use version from `PATH` for default setting otherwise.
# Defaults to `true` as usually not defined on a per projet basis.
}:
assert pythonUseFixed -> null != python;
assert ctagsUseFixed -> null != ctags;
let
pythonDefaultsTo = if pythonUseFixed then "${python}/bin/python" else "python";
pythonDefaultsTo = if pythonUseFixed then "${python3}/bin/python" else "python";
ctagsDefaultsTo = if ctagsUseFixed then "${ctags}/bin/ctags" else "ctags";
# The arch tag comes from 'PlatformName' defined here:
@@ -23,14 +23,14 @@ let
else throw "Only x86_64 Linux and Darwin are supported.";
languageServerSha256 = {
linux-x64 = "10qwi8lih5i6216d1vqsmviab73ha0d3zdvircrgrydkf0d4ancd";
osx-x64 = "08gjxs0bjhz5a9l35vvgwnvzshsyyqiqvb5hxv6w0k2ajgv5z7av";
linux-x64 = "1pmj5pb4xylx4gdx4zgmisn0si59qx51n2m1bh7clv29q6biw05n";
osx-x64 = "0ishiy1z9dghj4ryh95vy8rw0v7q4birdga2zdb4a8am31wmp94b";
}.${arch};
# version is languageServerVersion in the package.json
languageServer = extractNuGet rec {
name = "Python-Language-Server";
version = "0.4.127";
version = "0.5.30";
src = fetchurl {
url = "https://pvsc.azureedge.net/python-language-server-stable/${name}-${arch}.${version}.nupkg";
@@ -41,8 +41,8 @@ in vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "python";
publisher = "ms-python";
version = "2020.2.64397";
sha256 = "1kwyc5ycz1276i2zbw93mpq59y2py6kj71gvhzya8xvm184jk07a";
version = "2020.3.69010";
sha256 = "1dg8wfc3yl0msg6c9ccbvwc78f559109slsagi0lgnbc40v6v24b";
};
buildInputs = [
@@ -54,6 +54,11 @@ in vscode-utils.buildVscodeMarketplaceExtension {
nativeBuildInputs = [
autoPatchelfHook
python3.pkgs.wrapPython
];
pythonPath = with python3.pkgs; [
setuptools
];
postPatch = ''
@@ -70,6 +75,8 @@ in vscode-utils.buildVscodeMarketplaceExtension {
mkdir -p "$out/$installPrefix/languageServer.${languageServer.version}"
cp -R --no-preserve=ownership ${languageServer}/* "$out/$installPrefix/languageServer.${languageServer.version}"
chmod -R +wx "$out/$installPrefix/languageServer.${languageServer.version}"
patchPythonScript "$out/$installPrefix/pythonFiles/lib/python/isort/main.py"
'';
meta = with lib; {
@@ -7,7 +7,7 @@
let
inherit (vscode-utils) buildVscodeMarketplaceExtension;
# patch runs on remote machine hence use of which
# links to local node if version is 12
patch = ''
@@ -36,8 +36,8 @@ in
mktplcRef = {
name = "remote-ssh";
publisher = "ms-vscode-remote";
version = "0.48.0";
sha256 = "04q53gljqh5snkrdf5l69g0ahn1s5z35a4ipfcbf1rsjjmm85a19";
version = "0.50.0";
sha256 = "01pyd6759p5nkjhjy3iplrl748xblr54l1jphk2g02s1n5ds2qb9";
};
postPatch = ''
+8 -9
View File
@@ -1,9 +1,6 @@
{ stdenv, lib, fetchurl, vscode, unzip }:
{ stdenv, lib, fetchurl, unzip }:
let
extendedPkgVersion = lib.getVersion vscode;
extendedPkgName = lib.removeSuffix "-${extendedPkgVersion}" vscode.name;
mktplcExtRefToFetchArgs = ext: {
url = "https://${ext.publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${ext.publisher}/extension/${ext.name}/${ext.version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage";
sha256 = ext.sha256;
@@ -14,7 +11,6 @@ let
buildVscodeExtension = a@{
name,
namePrefix ? "${extendedPkgName}-extension-",
src,
# Same as "Unique Identifier" on the extension's web page.
# For the moment, only serve as unique extension dir.
@@ -28,12 +24,12 @@ let
}:
stdenv.mkDerivation ((removeAttrs a [ "vscodeExtUniqueId" ]) // {
name = namePrefix + name;
name = "vscode-extension-${name}";
inherit vscodeExtUniqueId;
inherit configurePhase buildPhase dontPatchELF dontStrip;
installPrefix = "share/${extendedPkgName}/extensions/${vscodeExtUniqueId}";
installPrefix = "${vscodeExtUniqueId}";
buildInputs = [ unzip ] ++ buildInputs;
@@ -55,12 +51,15 @@ let
buildVscodeMarketplaceExtension = a@{
name ? "",
src ? null,
vsix ? null,
mktplcRef,
...
}: assert "" == name; assert null == src;
buildVscodeExtension ((removeAttrs a [ "mktplcRef" ]) // {
buildVscodeExtension ((removeAttrs a [ "mktplcRef" "vsix" ]) // {
name = "${mktplcRef.publisher}-${mktplcRef.name}-${mktplcRef.version}";
src = fetchVsixFromVscodeMarketplace mktplcRef;
src = if (vsix != null)
then vsix
else fetchVsixFromVscodeMarketplace mktplcRef;
vscodeExtUniqueId = "${mktplcRef.publisher}.${mktplcRef.name}";
});