neovim lspconfig

This commit is contained in:
Tristan 2023-12-23 15:43:26 +00:00
parent fb5c04a84a
commit 34aaaf63d2
29 changed files with 1705 additions and 1399 deletions

View file

@ -1,124 +1,167 @@
{ lib, stdenv, fetchurl, wrapGAppsHook, makeWrapper
, dpkg
, alsa-lib
, at-spi2-atk
, at-spi2-core
, atk
, cairo
, cups
, dbus
, expat
, fontconfig
, freetype
, gdk-pixbuf
, glib
, gnome
, gsettings-desktop-schemas
, gtk3
, libuuid
, libdrm
, libX11
, libXcomposite
, libXcursor
, libXdamage
, libXext
, libXfixes
, libXi
, libxkbcommon
, libXrandr
, libXrender
, libXScrnSaver
, libxshmfence
, libXtst
, mesa
, nspr
, nss
, pango
, pipewire
, udev
, wayland
, xorg
, zlib
, xdg-utils
, snappy
{
lib,
stdenv,
fetchurl,
wrapGAppsHook,
makeWrapper,
dpkg,
alsa-lib,
at-spi2-atk,
at-spi2-core,
atk,
cairo,
cups,
dbus,
expat,
fontconfig,
freetype,
gdk-pixbuf,
glib,
gnome,
gsettings-desktop-schemas,
gtk3,
libuuid,
libdrm,
libX11,
libXcomposite,
libXcursor,
libXdamage,
libXext,
libXfixes,
libXi,
libxkbcommon,
libXrandr,
libXrender,
libXScrnSaver,
libxshmfence,
libXtst,
mesa,
nspr,
nss,
pango,
pipewire,
udev,
wayland,
xorg,
zlib,
xdg-utils,
snappy,
# command line arguments which are always set e.g "--disable-gpu"
commandLineArgs ? "",
# Necessary for USB audio devices.
pulseSupport ? stdenv.isLinux,
libpulseaudio,
# For GPU acceleration support on Wayland (without the lib it doesn't seem to work)
libGL,
# For video acceleration via VA-API (--enable-features=VaapiVideoDecoder,VaapiVideoEncoder)
libvaSupport ? stdenv.isLinux,
libva,
enableVideoAcceleration ? libvaSupport,
# For Vulkan support (--enable-features=Vulkan); disabled by default as it seems to break VA-API
vulkanSupport ? false,
addOpenGLRunpath,
enableVulkan ? vulkanSupport,
}: let
inherit
(lib)
optional
optionals
makeLibraryPath
makeSearchPathOutput
makeBinPath
optionalString
strings
escapeShellArg
;
# command line arguments which are always set e.g "--disable-gpu"
, commandLineArgs ? ""
# Necessary for USB audio devices.
, pulseSupport ? stdenv.isLinux
, libpulseaudio
# For GPU acceleration support on Wayland (without the lib it doesn't seem to work)
, libGL
# For video acceleration via VA-API (--enable-features=VaapiVideoDecoder,VaapiVideoEncoder)
, libvaSupport ? stdenv.isLinux
, libva
, enableVideoAcceleration ? libvaSupport
# For Vulkan support (--enable-features=Vulkan); disabled by default as it seems to break VA-API
, vulkanSupport ? false
, addOpenGLRunpath
, enableVulkan ? vulkanSupport
}:
let
inherit (lib) optional optionals makeLibraryPath makeSearchPathOutput makeBinPath
optionalString strings escapeShellArg;
deps = [
alsa-lib at-spi2-atk at-spi2-core atk cairo cups dbus expat
fontconfig freetype gdk-pixbuf glib gtk3 libdrm libX11 libGL
libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage
libXext libXfixes libXi libXrandr libXrender libxshmfence
libXtst libuuid mesa nspr nss pango pipewire udev wayland
xorg.libxcb zlib snappy
]
deps =
[
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
libdrm
libX11
libGL
libxkbcommon
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libxshmfence
libXtst
libuuid
mesa
nspr
nss
pango
pipewire
udev
wayland
xorg.libxcb
zlib
snappy
]
++ optional pulseSupport libpulseaudio
++ optional libvaSupport libva;
rpath = makeLibraryPath deps + ":" + makeSearchPathOutput "lib" "lib64" deps;
binpath = makeBinPath deps;
enableFeatures = optionals enableVideoAcceleration [ "VaapiVideoDecoder" "VaapiVideoEncoder" ]
enableFeatures =
optionals enableVideoAcceleration ["VaapiVideoDecoder" "VaapiVideoEncoder"]
++ optional enableVulkan "Vulkan";
# The feature disable is needed for VAAPI to work correctly: https://github.com/brave/brave-browser/issues/20935
# The feature disable is needed for VAAPI to work correctly: https://github.com/brave/brave-browser/issues/20935
disableFeatures = optional enableVideoAcceleration "UseChromeOSDirectVideoDecoder";
braveChannel = "nightly";
in
stdenv.mkDerivation rec {
pname = "brave-${braveChannel}";
version = "1.52.54";
stdenv.mkDerivation rec {
pname = "brave-${braveChannel}";
version = "1.52.54";
src = fetchurl {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser-${braveChannel}_${version}_amd64.deb";
sha256 = "sha256-k9Vxk9e9514II78pe0FPRNNXwSHKRqLigqefSOmNVjg=";
};
src = fetchurl {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser-${braveChannel}_${version}_amd64.deb";
sha256 = "sha256-k9Vxk9e9514II78pe0FPRNNXwSHKRqLigqefSOmNVjg=";
};
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
doInstallCheck = true;
dontConfigure = true;
dontBuild = true;
dontPatchELF = true;
doInstallCheck = true;
nativeBuildInputs = [
dpkg
(wrapGAppsHook.override {inherit makeWrapper;})
];
nativeBuildInputs = [
dpkg
(wrapGAppsHook.override { inherit makeWrapper; })
];
buildInputs = [
# needed for GSETTINGS_SCHEMAS_PATH
glib
gsettings-desktop-schemas
gtk3
buildInputs = [
# needed for GSETTINGS_SCHEMAS_PATH
glib gsettings-desktop-schemas gtk3
# needed for XDG_ICON_DIRS
gnome.adwaita-icon-theme
];
# needed for XDG_ICON_DIRS
gnome.adwaita-icon-theme
];
unpackPhase = "dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner";
unpackPhase = "dpkg-deb --fsys-tarfile $src | tar -x --no-same-permissions --no-same-owner";
installPhase = ''
installPhase = ''
runHook preInstall
mkdir -p $out $out/bin
@ -164,47 +207,47 @@ stdenv.mkDerivation rec {
ln -sf ${xdg-utils}/bin/xdg-mime $out/opt/brave.com/brave-${braveChannel}/xdg-mime
runHook postInstall
'';
preFixup = ''
# Add command line args to wrapGApp.
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : ${rpath}
--prefix PATH : ${binpath}
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
${optionalString (enableFeatures != []) ''
--add-flags "--enable-features=${strings.concatStringsSep "," enableFeatures}"
''}
${optionalString (disableFeatures != []) ''
--add-flags "--disable-features=${strings.concatStringsSep "," disableFeatures}"
''}
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
${optionalString vulkanSupport ''
--prefix XDG_DATA_DIRS : "${addOpenGLRunpath.driverLink}/share"
''}
--add-flags ${escapeShellArg commandLineArgs}
)
'';
installCheckPhase = ''
# Bypass upstream wrapper which suppresses errors
$out/opt/brave.com/brave-${braveChannel}/brave-browser-${braveChannel} --version
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
homepage = "https://brave.com/";
description = "Privacy-oriented browser for Desktop and Laptop computers";
changelog = "https://github.com/brave/brave-browser/blob/master/CHANGELOG_DESKTOP.md#" + replaceStrings [ "." ] [ "" ] version;
longDescription = ''
Brave browser blocks the ads and trackers that slow you down,
chew up your bandwidth, and invade your privacy. Brave lets you
contribute to your favorite creators automatically.
'';
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.mpl20;
maintainers = with maintainers; [ uskudnik rht jefflabonte nasirhm ];
platforms = [ "x86_64-linux" ];
};
}
preFixup = ''
# Add command line args to wrapGApp.
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : ${rpath}
--prefix PATH : ${binpath}
--suffix PATH : ${lib.makeBinPath [xdg-utils]}
${optionalString (enableFeatures != []) ''
--add-flags "--enable-features=${strings.concatStringsSep "," enableFeatures}"
''}
${optionalString (disableFeatures != []) ''
--add-flags "--disable-features=${strings.concatStringsSep "," disableFeatures}"
''}
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
${optionalString vulkanSupport ''
--prefix XDG_DATA_DIRS : "${addOpenGLRunpath.driverLink}/share"
''}
--add-flags ${escapeShellArg commandLineArgs}
)
'';
installCheckPhase = ''
# Bypass upstream wrapper which suppresses errors
$out/opt/brave.com/brave-${braveChannel}/brave-browser-${braveChannel} --version
'';
passthru.updateScript = ./update.sh;
meta = with lib; {
homepage = "https://brave.com/";
description = "Privacy-oriented browser for Desktop and Laptop computers";
changelog = "https://github.com/brave/brave-browser/blob/master/CHANGELOG_DESKTOP.md#" + replaceStrings ["."] [""] version;
longDescription = ''
Brave browser blocks the ads and trackers that slow you down,
chew up your bandwidth, and invade your privacy. Brave lets you
contribute to your favorite creators automatically.
'';
sourceProvenance = with sourceTypes; [binaryNativeCode];
license = licenses.mpl20;
maintainers = with maintainers; [uskudnik rht jefflabonte nasirhm];
platforms = ["x86_64-linux"];
};
}

View file

@ -1,10 +1,10 @@
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
, installShellFiles
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "lf";
version = "28-1";
@ -18,13 +18,13 @@ buildGoModule rec {
vendorHash = "sha256-oIIyQbw42+B6T6Qn6nIV62Xr+8ms3tatfFI8ocYNr0A=";
nativeBuildInputs = [ installShellFiles ];
nativeBuildInputs = [installShellFiles];
ldflags = [ "-s" "-w" "-X main.gVersion=r${version}" ];
ldflags = ["-s" "-w" "-X main.gVersion=r${version}"];
# Force the use of the pure-go implementation of the os/user library.
# Relevant issue: https://github.com/gokcehan/lf/issues/191
tags = lib.optionals (!stdenv.isDarwin) [ "osusergo" ];
tags = lib.optionals (!stdenv.isDarwin) ["osusergo"];
postInstall = ''
install -D --mode=444 lf.desktop $out/share/applications/lf.desktop
@ -44,6 +44,6 @@ buildGoModule rec {
changelog = "https://github.com/gokcehan/lf/releases/tag/r${version}";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ dotlambda ];
maintainers = with maintainers; [dotlambda];
};
}