vscode-extensions: add set for aliases

This commit is contained in:
Philipp Riegger 2020-06-16 17:06:51 +02:00 committed by Jonathan Ringer
parent 8b010d8904
commit 2744d2e31f

View file

@ -1,17 +1,17 @@
{ stdenv, callPackage, vscode-utils, llvmPackages_8, llvmPackages_latest }:
{ stdenv, config, lib, callPackage, vscode-utils, llvmPackages_8, llvmPackages_latest }:
let
inherit (vscode-utils) buildVscodeMarketplaceExtension;
in
#
# Unless there is a good reason not to, we attempt to use the same name as the
# extension's unique identifier (the name the extension gets when installed
# from vscode under `~/.vscode`) and found on the marketplace extension page.
# So an extension's attribute name should be of the form:
# "${mktplcRef.publisher}.${mktplcRef.name}".
#
stdenv.lib.mapAttrs (_n: stdenv.lib.recurseIntoAttrs)
{
#
# Unless there is a good reason not to, we attempt to use the same name as the
# extension's unique identifier (the name the extension gets when installed
# from vscode under `~/.vscode`) and found on the marketplace extension page.
# So an extension's attribute name should be of the form:
# "${mktplcRef.publisher}.${mktplcRef.name}".
#
self = stdenv.lib.mapAttrs (_n: stdenv.lib.recurseIntoAttrs)
{
alanz.vscode-hie-server = buildVscodeMarketplaceExtension {
mktplcRef = {
@ -245,4 +245,10 @@ stdenv.lib.mapAttrs (_n: stdenv.lib.recurseIntoAttrs)
llvm-org.lldb-vscode = llvmPackages_8.lldb;
WakaTime.vscode-wakatime = callPackage ./wakatime {};
}
} // lib.optionalAttrs (config.allowAliases or true) (
with self; {
# aliases
}
);
in
self