Unverified Commit 44e41aeb authored by Austin Horstman's avatar Austin Horstman Committed by GitHub
Browse files

bicep-lsp: init 0.34.44 (#397765)

parents 214e7054 50159a84
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3331,6 +3331,8 @@ let
        };
      };

      ms-azuretools.vscode-bicep = callPackage ./ms-azuretools.vscode-bicep { };

      ms-azuretools.vscode-docker = buildVscodeMarketplaceExtension {
        mktplcRef = {
          publisher = "ms-azuretools";
+59 −0
Original line number Diff line number Diff line
{
  azure-cli,
  bicep,
  bicep-lsp,
  lib,
  vscode-utils,
}:

vscode-utils.buildVscodeMarketplaceExtension {
  mktplcRef = {
    publisher = "ms-azuretools";
    name = "vscode-bicep";
    version = "0.34.44";
    hash = "sha256-y+FdlnJeYBpu30s5g+39HczVN5ncaacHvybYLVebH34=";
  };

  buildInputs = [
    azure-cli
    bicep
    bicep-lsp
  ];

  meta = {
    description = "Visual Studio Code extension for Bicep language";
    downloadPage = "https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep";
    homepage = "https://github.com/Azure/bicep/tree/main/src/vscode-bicep";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ ] ++ lib.teams.stridtech.members;
  };
}

# Instructions on Usage
#
# programs.vscode = {
#  enable = true;
#  package = pkgs.codium;
#  profiles.default = {
#    "dotnetAcquisitionExtension.sharedExistingDotnetPath" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
#    "dotnetAcquisitionExtension.existingDotnetPath" = [
#       {
#          "extensionId" = "ms-dotnettools.csharp";
#          "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
#       }
#       {
#          "extensionId" = "ms-dotnettools.csdevkit";
#          "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
#       }
#       {
#          "extensionId" = "ms-azuretools.vscode-bicep";
#          "path" = "${pkgs.dotnet-sdk_8}/bin/dotnet";
#       }
#    ];
#  extensions = with pkgs.vscode-extensions; [
#    ms-azuretools.vscode-bicep
#    ms-dotnettools.csdevkit
#    ms-dotnettools.csharp
#    ms-dotnettools.vscode-dotnet-runtime
#  ];
# };
+1297 −0

File added.

Preview size limit exceeded, changes collapsed.

+57 −0
Original line number Diff line number Diff line
{
  autoPatchelfHook,
  buildDotnetModule,
  coreutils,
  dotnetCorePackages,
  fetchFromGitHub,
  icu,
  lib,
  libkrb5,
  openssl,
  stdenv,
}:

buildDotnetModule rec {
  pname = "bicep-lsp";
  version = "0.34.44";

  src = fetchFromGitHub {
    owner = "Azure";
    repo = "bicep";
    tag = "v${version}";
    hash = "sha256-vyPRLPTvQkwN7unlIHs6DvpjXnXyW1PDtH9hhIOgN1A=";
  };

  projectFile = "src/Bicep.LangServer/Bicep.LangServer.csproj";

  postPatch = ''
    substituteInPlace global.json --replace-warn "8.0.406" "${dotnetCorePackages.sdk_8_0.version}"
  '';

  nugetDeps = ./deps.json;

  # From: https://github.com/Azure/bicep/blob/v0.34.44/global.json#L7
  dotnet-sdk = dotnetCorePackages.sdk_8_0;
  dotnet-runtime = dotnetCorePackages.runtime_8_0;

  nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];

  buildInputs = lib.optionals stdenv.isLinux [
    icu
    libkrb5
    openssl
    stdenv.cc.cc.lib
  ];

  doCheck = !(stdenv.isDarwin && stdenv.isAarch64); # mono is not available on aarch64-darwin

  meta = {
    description = "Domain Specific Language (DSL) for deploying Azure resources declaratively";
    homepage = "https://github.com/Azure/bicep/";
    changelog = "https://github.com/Azure/bicep/releases/tag/v${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ ] ++ lib.teams.stridtech.members;
    platforms = lib.platforms.all;
    badPlatforms = [ "aarch64-linux" ];
  };
}