From 522b18e7436b0856bf7f22c4df841917d0203c3a Mon Sep 17 00:00:00 2001 From: David Leadbeater Date: Wed, 31 May 2023 17:45:41 +1000 Subject: [PATCH] vim: Add option for sodium This enables building with libsodium which enables the xchacha20 cryptmethod in Vim. vim-full defaults this on as it's fairly small and part of the 'normal' upstream Vim featureset. --- pkgs/applications/editors/vim/full.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vim/full.nix b/pkgs/applications/editors/vim/full.nix index dc361d8e8807..cfb8b84560cb 100644 --- a/pkgs/applications/editors/vim/full.nix +++ b/pkgs/applications/editors/vim/full.nix @@ -1,6 +1,6 @@ { source ? "default", callPackage, lib, stdenv, ncurses, pkg-config, gettext , writeText, config, glib, gtk2-x11, gtk3-x11, lua, python3, perl, tcl, ruby -, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu +, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu, libsodium , libICE , vimPlugins , makeWrapper @@ -25,6 +25,7 @@ , ximSupport ? config.vim.xim or true # less than 15KB, needed for deadkeys , darwinSupport ? config.vim.darwin or false # Enable Darwin support , ftNixSupport ? config.vim.ftNix or true # Add nix indentation support from vim-nix (not needed for basic syntax highlighting) +, sodiumSupport ? config.vim.sodium or true # Enable sodium based encryption }: @@ -125,7 +126,8 @@ in stdenv.mkDerivation { ++ lib.optional multibyteSupport "--enable-multibyte" ++ lib.optional cscopeSupport "--enable-cscope" ++ lib.optional netbeansSupport "--enable-netbeans" - ++ lib.optional ximSupport "--enable-xim"; + ++ lib.optional ximSupport "--enable-xim" + ++ lib.optional sodiumSupport "--enable-sodium"; nativeBuildInputs = [ pkg-config @@ -158,7 +160,8 @@ in stdenv.mkDerivation { ++ lib.optional luaSupport lua ++ lib.optional pythonSupport python3 ++ lib.optional tclSupport tcl - ++ lib.optional rubySupport ruby; + ++ lib.optional rubySupport ruby + ++ lib.optional sodiumSupport libsodium; # error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-fdeclspec";