Commit d31c82d0 authored by Gutyina Gergő's avatar Gutyina Gergő Committed by Yaya
Browse files

lua-language-server: format with nixfmt-rfc-style

parent bb7cbb1f
Loading
Loading
Loading
Loading
+36 −23
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, ninja, makeWrapper, CoreFoundation, Foundation, ditto }:
{
  lib,
  stdenv,
  fetchFromGitHub,
  ninja,
  makeWrapper,
  CoreFoundation,
  Foundation,
  ditto,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "lua-language-server";
@@ -23,13 +32,15 @@ stdenv.mkDerivation (finalAttrs: {
    ditto
  ];

  postPatch = ''
  postPatch =
    ''
      # filewatch tests are failing on darwin
      # this feature is not used in lua-language-server
      sed -i /filewatch/d 3rd/bee.lua/test/test.lua

      pushd 3rd/luamake
  '' + lib.optionalString stdenv.isDarwin ''
    ''
    + lib.optionalString stdenv.isDarwin ''
      # This package uses the program clang for C and C++ files. The language
      # is selected via the command line argument -std, but this do not work
      # in combination with the nixpkgs clang wrapper. Therefor we have to
@@ -43,9 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
        -e '/cxx_/s,$cc,clang++,'
    '';

  ninjaFlags = [
    "-fcompile/ninja/${if stdenv.isDarwin then "macos" else "linux"}.ninja"
  ];
  ninjaFlags = [ "-fcompile/ninja/${if stdenv.isDarwin then "macos" else "linux"}.ninja" ];

  postBuild = ''
    popd
@@ -80,7 +89,11 @@ stdenv.mkDerivation (finalAttrs: {
    homepage = "https://github.com/luals/lua-language-server";
    changelog = "https://github.com/LuaLS/lua-language-server/blob/${finalAttrs.version}/changelog.md";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda gepbird sei40kr ];
    maintainers = with maintainers; [
      figsoda
      gepbird
      sei40kr
    ];
    mainProgram = "lua-language-server";
    platforms = platforms.linux ++ platforms.darwin;
  };