summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjansol <jhs@psonet.com>2024-05-02 12:23:28 +0300
committerGitHub <noreply@github.com>2024-05-02 11:23:28 +0200
commit18b0191d2922001ba3e0a23bec250ca4fec60e12 (patch)
treea3c67b6c3260de1060eca3e86e73d31924ba60bc
parentdbcd352312596281f9c85f26e0756a9d745f4d43 (diff)
vale-ls: init at 0.3.7-unstable-2024-03-13 (#304375)
Co-authored-by: Olivia Crain <olivia@olivia.dev> Co-authored-by: Gabriel Arazas <foodogsquared@foodogsquared.one>
-rw-r--r--pkgs/by-name/va/vale-ls/package.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/by-name/va/vale-ls/package.nix b/pkgs/by-name/va/vale-ls/package.nix
new file mode 100644
index 000000000000..b79f94c7627c
--- /dev/null
+++ b/pkgs/by-name/va/vale-ls/package.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, makeWrapper
+, rustPlatform
+, pkg-config
+, openssl
+, darwin
+, vale
+}:
+
+rustPlatform.buildRustPackage {
+ pname = "vale-ls";
+ version = "0.3.7-unstable-2024-03-13";
+
+ src = fetchFromGitHub {
+ owner = "errata-ai";
+ repo = "vale-ls";
+ rev = "473e16bc88ec48b35e2bd208adc174878c4d5396";
+ hash = "sha256-ywJsnWMc9NSjYjsK6SXdMAQl+hcP+KQ7Xp1A99aeqAg=";
+ };
+
+ nativeBuildInputs = [
+ rustPlatform.bindgenHook
+ pkg-config
+ makeWrapper
+ ];
+
+ buildInputs = [
+ openssl
+ ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
+ SystemConfiguration
+ ]);
+
+ checkFlags = [
+ # The following tests are reaching to the network.
+ "--skip=vale::tests"
+ ] ++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
+ # This test does not account for the existence of aarch64-linux machines,
+ # despite upstream shipping artifacts for that architecture
+ "--skip=utils::tests::arch"
+ ];
+
+ env.OPENSSL_NO_VENDOR = true;
+
+ cargoHash = "sha256-ifKdSTmVWfDZF5Kn9b5JpzDxa160oRTfzjvxeL9POBg=";
+
+ postInstall = ''
+ wrapProgram $out/bin/vale-ls \
+ --prefix PATH : ${lib.makeBinPath [ vale ]}
+ '';
+
+ meta = with lib; {
+ description = "LSP implementation for the Vale command-line tool";
+ homepage = "https://github.com/errata-ai/vale-ls";
+ license = licenses.mit;
+ mainProgram = "vale-ls";
+ maintainers = with maintainers; [ foo-dogsquared jansol ];
+ };
+}
+