From 85fa4ac03e9b26420a90512d5bf6e5c2b9a5d423 Mon Sep 17 00:00:00 2001 From: BattleCh1cken Date: Mon, 10 Oct 2022 11:05:37 -0400 Subject: [PATCH] arduino-language-server: init at 0.7.1 --- .../arduino-language-server/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/embedded/arduino/arduino-language-server/default.nix diff --git a/pkgs/development/embedded/arduino/arduino-language-server/default.nix b/pkgs/development/embedded/arduino/arduino-language-server/default.nix new file mode 100644 index 000000000000..cba2e595cf78 --- /dev/null +++ b/pkgs/development/embedded/arduino/arduino-language-server/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "arduino-language-server"; + version = "0.7.1"; + + src = fetchFromGitHub { + owner = "arduino"; + repo = "arduino-language-server"; + rev = version; + hash = "sha256-FnkXtjktj22LCkmFPxzQ72qiVBC1WR/ZiwMsmZPL578="; + }; + + subPackages = [ "." ]; + + vendorHash = "sha256-Xa26ilo95sQ/6dGvl4gB2bb0vzWXr+WPKLezAnZPeqM="; + + doCheck = false; + + ldflags = [ + "-s" + "-w" + "-X github.com/arduino/arduino-language-server/version.versionString=${version}" + "-X github.com/arduino/arduino-language-server/version.commit=unknown" + ] ++ lib.optionals stdenv.isLinux [ "-extldflags '-static'" ]; + + meta = with lib; { + inherit (src.meta) homepage; + description = "An Arduino Language Server based on Clangd to Arduino code autocompletion"; + license = licenses.asl20; + maintainers = with maintainers; [ BattleCh1cken ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a09bb50c797..37ae8477ef02 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2063,6 +2063,8 @@ with pkgs; arduino-core = callPackage ../development/embedded/arduino/arduino-core/chrootenv.nix { }; arduino-core-unwrapped = callPackage ../development/embedded/arduino/arduino-core { }; + arduino-language-server = callPackage ../development/embedded/arduino/arduino-language-server { }; + arduino-mk = callPackage ../development/embedded/arduino/arduino-mk {}; apio = python3Packages.callPackage ../development/embedded/fpga/apio { };