From 360d4c30739e50b1657d5281de918879d79388da Mon Sep 17 00:00:00 2001 From: Andrey Kuznetsov Date: Fri, 5 Feb 2021 12:39:41 +0000 Subject: [PATCH] vimPlugins: format overrides.nix with nixpkgs-fmt 1.0 --- pkgs/misc/vim-plugins/overrides.nix | 546 +++++++++++++++------------- 1 file changed, 303 insertions(+), 243 deletions(-) diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index a7ee9d2db1fe..c7aff3c97ae1 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -1,39 +1,82 @@ -{ lib, stdenv -, python, cmake, meson, vim, ruby -, which, fetchFromGitHub, fetchgit, fetchurl, fetchzip, fetchpatch -, llvmPackages, rustPlatform, buildGoModule -, pkg-config, curl, openssl, libgit2, libiconv -, xkb-switch, fzf, skim, stylish-haskell -, python3, boost, icu, ncurses -, ycmd, rake -, gobject-introspection, glib, wrapGAppsHook +{ lib +, stdenv +, python +, cmake +, meson +, vim +, ruby +, which +, fetchFromGitHub +, fetchgit +, fetchurl +, fetchzip +, fetchpatch +, llvmPackages +, rustPlatform +, buildGoModule +, pkg-config +, curl +, openssl +, libgit2 +, libiconv +, xkb-switch +, fzf +, skim +, stylish-haskell +, python3 +, boost +, icu +, ncurses +, ycmd +, rake +, gobject-introspection +, glib +, wrapGAppsHook , substituteAll , languagetool , tabnine -, Cocoa, CoreFoundation, CoreServices + +, Cocoa +, CoreFoundation +, CoreServices + , buildVimPluginFrom2Nix , nodePackages , dasht , sqlite , code-minimap -# deoplete-khard dependency + # deoplete-khard dependency , khard -# vim-go dependencies -, asmfmt, delve, errcheck, godef, golint -, gomodifytags, gotags, gotools, go-motion -, gnused, reftools, gogetdoc, golangci-lint -, impl, iferr, gocode, gocode-gomod, go-tools + # vim-go dependencies +, asmfmt +, delve +, errcheck +, godef +, golint +, gomodifytags +, gotags +, gotools +, go-motion +, gnused +, reftools +, gogetdoc +, golangci-lint +, impl +, iferr +, gocode +, gocode-gomod +, go-tools , gopls -# direnv-vim dependencies + # direnv-vim dependencies , direnv -# vCoolor dependency + # vCoolor dependency , gnome3 -# fruzzy dependency + # fruzzy dependency , nim }: @@ -61,42 +104,44 @@ self: super: { src = skim.vim; }; - LanguageClient-neovim = let - version = "0.1.160"; - LanguageClient-neovim-src = fetchFromGitHub { - owner = "autozimu"; - repo = "LanguageClient-neovim"; - rev = version; - sha256 = "143cifahav1pfmpx3j1ihx433jrwxf6z27s0wxndgjkd2plkks58"; - }; - LanguageClient-neovim-bin = rustPlatform.buildRustPackage { - pname = "LanguageClient-neovim-bin"; + LanguageClient-neovim = + let + version = "0.1.160"; + LanguageClient-neovim-src = fetchFromGitHub { + owner = "autozimu"; + repo = "LanguageClient-neovim"; + rev = version; + sha256 = "143cifahav1pfmpx3j1ihx433jrwxf6z27s0wxndgjkd2plkks58"; + }; + LanguageClient-neovim-bin = rustPlatform.buildRustPackage { + pname = "LanguageClient-neovim-bin"; + inherit version; + src = LanguageClient-neovim-src; + + cargoSha256 = "0mf94j85awdcqa6cyb89bipny9xg13ldkznjf002fq747f55my2a"; + buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + + # FIXME: Use impure version of CoreFoundation because of missing symbols. + # Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable" + preConfigure = lib.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS" + ''; + }; + in + buildVimPluginFrom2Nix { + pname = "LanguageClient-neovim"; inherit version; src = LanguageClient-neovim-src; - cargoSha256 = "0mf94j85awdcqa6cyb89bipny9xg13ldkznjf002fq747f55my2a"; - buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ]; + propagatedBuildInputs = [ LanguageClient-neovim-bin ]; - # FIXME: Use impure version of CoreFoundation because of missing symbols. - # Undefined symbols for architecture x86_64: "_CFURLResourceIsReachable" - preConfigure = lib.optionalString stdenv.isDarwin '' - export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS" + preFixup = '' + substituteInPlace "$out"/share/vim-plugins/LanguageClient-neovim/autoload/LanguageClient.vim \ + --replace "let l:path = s:root . '/bin/'" "let l:path = '${LanguageClient-neovim-bin}' . '/bin/'" ''; }; - in buildVimPluginFrom2Nix { - pname = "LanguageClient-neovim"; - inherit version; - src = LanguageClient-neovim-src; - propagatedBuildInputs = [ LanguageClient-neovim-bin ]; - - preFixup = '' - substituteInPlace "$out"/share/vim-plugins/LanguageClient-neovim/autoload/LanguageClient.vim \ - --replace "let l:path = s:root . '/bin/'" "let l:path = '${LanguageClient-neovim-bin}' . '/bin/'" - ''; - }; - - clang_complete = super.clang_complete.overrideAttrs(old: { + clang_complete = super.clang_complete.overrideAttrs (old: { # In addition to the arguments you pass to your compiler, you also need to # specify the path of the C++ std header (if you are using C++). # These usually implicitly set by cc-wrapper around clang (pkgs/build-support/cc-wrapper). @@ -111,7 +156,7 @@ self: super: { ''; }); - direnv-vim = super.direnv-vim.overrideAttrs(oa: { + direnv-vim = super.direnv-vim.overrideAttrs (oa: { preFixup = oa.preFixup or "" + '' substituteInPlace $out/share/vim-plugins/direnv-vim/autoload/direnv.vim \ --replace "let s:direnv_cmd = get(g:, 'direnv_cmd', 'direnv')" \ @@ -119,14 +164,14 @@ self: super: { ''; }); - clighter8 = super.clighter8.overrideAttrs(old: { + clighter8 = super.clighter8.overrideAttrs (old: { preFixup = '' sed "/^let g:clighter8_libclang_path/s|')$|${llvmPackages.clang.cc.lib}/lib/libclang.so')|" \ -i "$out"/share/vim-plugins/clighter8/plugin/clighter8.vim ''; }); - command-t = super.command-t.overrideAttrs(old: { + command-t = super.command-t.overrideAttrs (old: { buildInputs = [ ruby rake ]; buildPhase = '' rake make @@ -134,7 +179,7 @@ self: super: { ''; }); - cpsm = super.cpsm.overrideAttrs(old: { + cpsm = super.cpsm.overrideAttrs (old: { buildInputs = [ python3 stdenv @@ -150,7 +195,7 @@ self: super: { ''; }); - ctrlp-cmatcher = super.ctrlp-cmatcher.overrideAttrs(old: { + ctrlp-cmatcher = super.ctrlp-cmatcher.overrideAttrs (old: { buildInputs = [ python ]; buildPhase = '' patchShebangs . @@ -158,25 +203,25 @@ self: super: { ''; }); - defx-nvim = super.defx-nvim.overrideAttrs(old: { + defx-nvim = super.defx-nvim.overrideAttrs (old: { dependencies = with super; [ nvim-yarp ]; }); - deoplete-fish = super.deoplete-fish.overrideAttrs(old: { + deoplete-fish = super.deoplete-fish.overrideAttrs (old: { dependencies = with super; [ deoplete-nvim vim-fish ]; }); - deoplete-go = super.deoplete-go.overrideAttrs(old: { + deoplete-go = super.deoplete-go.overrideAttrs (old: { buildInputs = [ python3 ]; buildPhase = '' pushd ./rplugin/python3/deoplete/ujson python3 setup.py build --build-base=$PWD/build --build-lib=$PWD/build popd find ./rplugin/ -name "ujson*.so" -exec mv -v {} ./rplugin/python3/ \; - ''; + ''; }); - deoplete-khard = super.deoplete-khard.overrideAttrs(old: { + deoplete-khard = super.deoplete-khard.overrideAttrs (old: { dependencies = [ self.deoplete-nvim ]; passthru.python3Dependencies = ps: [ (ps.toPythonModule khard) ]; meta = { @@ -187,52 +232,55 @@ self: super: { }; }); - ensime-vim = super.ensime-vim.overrideAttrs(old: { + ensime-vim = super.ensime-vim.overrideAttrs (old: { passthru.python3Dependencies = ps: with ps; [ sexpdata websocket_client ]; dependencies = with super; [ vimproc-vim vimshell-vim super.self forms ]; }); - forms = super.forms.overrideAttrs(old: { + forms = super.forms.overrideAttrs (old: { dependencies = with super; [ super.self ]; }); - fruzzy = let # until https://github.com/NixOS/nixpkgs/pull/67878 is merged, there's no better way to install nim libraries with nix - nimpy = fetchFromGitHub { - owner = "yglukhov"; - repo = "nimpy"; - rev = "4840d1e438985af759ddf0923e7a9250fd8ea0da"; - sha256 = "0qqklvaajjqnlqm3rkk36pwwnn7x942mbca7nf2cvryh36yg4q5k"; - }; - binaryheap = fetchFromGitHub { - owner = "bluenote10"; - repo = "nim-heap"; - rev = "c38039309cb11391112571aa332df9c55f625b54"; - sha256 = "05xdy13vm5n8dw2i366ppbznc4cfhq23rdcklisbaklz2jhdx352"; - }; - in super.fruzzy.overrideAttrs(old: { - buildInputs = [ nim ]; - patches = [ - (substituteAll { - src = ./patches/fruzzy/get_version.patch; - version = old.version; - }) - ]; - configurePhase = '' - substituteInPlace Makefile \ - --replace \ - "nim c" \ - "nim c --nimcache:$TMP --path:${nimpy} --path:${binaryheap}" - ''; - buildPhase = '' - make build - ''; - }); + fruzzy = + let + # until https://github.com/NixOS/nixpkgs/pull/67878 is merged, there's no better way to install nim libraries with nix + nimpy = fetchFromGitHub { + owner = "yglukhov"; + repo = "nimpy"; + rev = "4840d1e438985af759ddf0923e7a9250fd8ea0da"; + sha256 = "0qqklvaajjqnlqm3rkk36pwwnn7x942mbca7nf2cvryh36yg4q5k"; + }; + binaryheap = fetchFromGitHub { + owner = "bluenote10"; + repo = "nim-heap"; + rev = "c38039309cb11391112571aa332df9c55f625b54"; + sha256 = "05xdy13vm5n8dw2i366ppbznc4cfhq23rdcklisbaklz2jhdx352"; + }; + in + super.fruzzy.overrideAttrs (old: { + buildInputs = [ nim ]; + patches = [ + (substituteAll { + src = ./patches/fruzzy/get_version.patch; + version = old.version; + }) + ]; + configurePhase = '' + substituteInPlace Makefile \ + --replace \ + "nim c" \ + "nim c --nimcache:$TMP --path:${nimpy} --path:${binaryheap}" + ''; + buildPhase = '' + make build + ''; + }); - ghcid = super.ghcid.overrideAttrs(old: { + ghcid = super.ghcid.overrideAttrs (old: { configurePhase = "cd plugins/nvim"; }); - vimsence = super.vimsence.overrideAttrs(old: { + vimsence = super.vimsence.overrideAttrs (old: { meta = with lib; { description = "Discord rich presence for Vim"; homepage = "https://github.com/hugolgst/vimsence"; @@ -240,11 +288,11 @@ self: super: { }; }); - vim-gist = super.vim-gist.overrideAttrs(old: { + vim-gist = super.vim-gist.overrideAttrs (old: { dependencies = with super; [ webapi-vim ]; }); - minimap-vim = super.minimap-vim.overrideAttrs(old: { + minimap-vim = super.minimap-vim.overrideAttrs (old: { preFixup = '' substituteInPlace $out/share/vim-plugins/minimap-vim/plugin/minimap.vim \ --replace "code-minimap" "${code-minimap}/bin/code-minimap" @@ -259,68 +307,69 @@ self: super: { meta.maintainers = with lib.maintainers; [ vcunat ]; }; - ncm2 = super.ncm2.overrideAttrs(old: { + ncm2 = super.ncm2.overrideAttrs (old: { dependencies = with super; [ nvim-yarp ]; }); - ncm2-jedi = super.ncm2-jedi.overrideAttrs(old: { + ncm2-jedi = super.ncm2-jedi.overrideAttrs (old: { dependencies = with super; [ nvim-yarp ncm2 ]; passthru.python3Dependencies = ps: with ps; [ jedi ]; }); - ncm2-neoinclude = super.ncm2-neoinclude.overrideAttrs(old: { + ncm2-neoinclude = super.ncm2-neoinclude.overrideAttrs (old: { dependencies = with super; [ neoinclude-vim ]; }); - ncm2-neosnippet = super.ncm2-neosnippet.overrideAttrs(old: { + ncm2-neosnippet = super.ncm2-neosnippet.overrideAttrs (old: { dependencies = with super; [ neosnippet-vim ]; }); - ncm2-syntax = super.ncm2-syntax.overrideAttrs(old: { + ncm2-syntax = super.ncm2-syntax.overrideAttrs (old: { dependencies = with super; [ neco-syntax ]; }); - ncm2-ultisnips = super.ncm2-ultisnips.overrideAttrs(old: { + ncm2-ultisnips = super.ncm2-ultisnips.overrideAttrs (old: { dependencies = with super; [ ultisnips ]; }); - nvim-lsputils = super.nvim-lsputils.overrideAttrs(old: { + nvim-lsputils = super.nvim-lsputils.overrideAttrs (old: { dependencies = with super; [ popfix ]; }); - fzf-vim = super.fzf-vim.overrideAttrs(old: { + fzf-vim = super.fzf-vim.overrideAttrs (old: { dependencies = [ self.fzfWrapper ]; }); - skim-vim = super.skim-vim.overrideAttrs(old: { + skim-vim = super.skim-vim.overrideAttrs (old: { dependencies = [ self.skim ]; }); - sql-nvim = super.sql-nvim.overrideAttrs(old: { + sql-nvim = super.sql-nvim.overrideAttrs (old: { postPatch = '' substituteInPlace lua/sql/defs.lua \ --replace "vim.g.sql_clib_path or" "vim.g.sql_clib_path or '${sqlite.out}/lib/libsqlite3.so' or" ''; - }); + }); - sved = let - # we put the script in its own derivation to benefit the magic of wrapGAppsHook - svedbackend = stdenv.mkDerivation { - name = "svedbackend-${super.sved.name}"; - inherit (super.sved) src; - nativeBuildInputs = [ wrapGAppsHook ]; - buildInputs = [ - gobject-introspection - glib - (python3.withPackages(ps: with ps; [ pygobject3 pynvim dbus-python ])) - ]; - preferLocalBuild = true; - installPhase = '' - install -Dt $out/bin ftplugin/evinceSync.py - ''; - }; - in - super.sved.overrideAttrs(old: { + sved = + let + # we put the script in its own derivation to benefit the magic of wrapGAppsHook + svedbackend = stdenv.mkDerivation { + name = "svedbackend-${super.sved.name}"; + inherit (super.sved) src; + nativeBuildInputs = [ wrapGAppsHook ]; + buildInputs = [ + gobject-introspection + glib + (python3.withPackages (ps: with ps; [ pygobject3 pynvim dbus-python ])) + ]; + preferLocalBuild = true; + installPhase = '' + install -Dt $out/bin ftplugin/evinceSync.py + ''; + }; + in + super.sved.overrideAttrs (old: { preferLocalBuild = true; postPatch = '' rm ftplugin/evinceSync.py @@ -331,7 +380,7 @@ self: super: { }; }); - vimacs = super.vimacs.overrideAttrs(old: { + vimacs = super.vimacs.overrideAttrs (old: { buildPhase = '' substituteInPlace bin/vim \ --replace '/usr/bin/vim' 'vim' \ @@ -347,73 +396,74 @@ self: super: { }; }); - vimshell-vim = super.vimshell-vim.overrideAttrs(old: { + vimshell-vim = super.vimshell-vim.overrideAttrs (old: { dependencies = with super; [ vimproc-vim ]; }); - vim-addon-manager = super.vim-addon-manager.overrideAttrs(old: { + vim-addon-manager = super.vim-addon-manager.overrideAttrs (old: { buildInputs = lib.optional stdenv.isDarwin Cocoa; }); - vim-addon-actions = super.vim-addon-actions.overrideAttrs(old: { + vim-addon-actions = super.vim-addon-actions.overrideAttrs (old: { dependencies = with super; [ vim-addon-mw-utils tlib_vim ]; }); - vim-addon-async = super.vim-addon-async.overrideAttrs(old: { + vim-addon-async = super.vim-addon-async.overrideAttrs (old: { dependencies = with super; [ vim-addon-signs ]; }); - vim-addon-background-cmd = super.vim-addon-background-cmd.overrideAttrs(old: { + vim-addon-background-cmd = super.vim-addon-background-cmd.overrideAttrs (old: { dependencies = with super; [ vim-addon-mw-utils ]; }); - vim-addon-completion = super.vim-addon-completion.overrideAttrs(old: { + vim-addon-completion = super.vim-addon-completion.overrideAttrs (old: { dependencies = with super; [ tlib_vim ]; }); - vim-addon-goto-thing-at-cursor = super.vim-addon-goto-thing-at-cursor.overrideAttrs(old: { + vim-addon-goto-thing-at-cursor = super.vim-addon-goto-thing-at-cursor.overrideAttrs (old: { dependencies = with super; [ tlib_vim ]; }); - vim-addon-mru = super.vim-addon-mru.overrideAttrs(old: { + vim-addon-mru = super.vim-addon-mru.overrideAttrs (old: { dependencies = with super; [ vim-addon-other vim-addon-mw-utils ]; }); - vim-addon-nix = super.vim-addon-nix.overrideAttrs(old: { + vim-addon-nix = super.vim-addon-nix.overrideAttrs (old: { dependencies = with super; [ vim-addon-completion vim-addon-goto-thing-at-cursor vim-addon-errorformats vim-addon-actions - vim-addon-mw-utils tlib_vim + vim-addon-mw-utils + tlib_vim ]; }); - vim-addon-sql = super.vim-addon-sql.overrideAttrs(old: { + vim-addon-sql = super.vim-addon-sql.overrideAttrs (old: { dependencies = with super; [ vim-addon-completion vim-addon-background-cmd tlib_vim ]; }); - vim-addon-syntax-checker = super.vim-addon-syntax-checker.overrideAttrs(old: { + vim-addon-syntax-checker = super.vim-addon-syntax-checker.overrideAttrs (old: { dependencies = with super; [ vim-addon-mw-utils tlib_vim ]; }); - vim-addon-toggle-buffer = super.vim-addon-toggle-buffer.overrideAttrs(old: { + vim-addon-toggle-buffer = super.vim-addon-toggle-buffer.overrideAttrs (old: { dependencies = with super; [ vim-addon-mw-utils tlib_vim ]; }); - vim-addon-xdebug = super.vim-addon-xdebug.overrideAttrs(old: { + vim-addon-xdebug = super.vim-addon-xdebug.overrideAttrs (old: { dependencies = with super; [ webapi-vim vim-addon-mw-utils vim-addon-signs vim-addon-async ]; }); - vim-bazel = super.vim-bazel.overrideAttrs(old: { + vim-bazel = super.vim-bazel.overrideAttrs (old: { dependencies = with super; [ vim-maktaba ]; }); - vim-beancount = super.vim-beancount.overrideAttrs(old: { + vim-beancount = super.vim-beancount.overrideAttrs (old: { passthru.python3Dependencies = ps: with ps; [ beancount ]; }); - vim-closer = super.vim-closer.overrideAttrs(old: { + vim-closer = super.vim-closer.overrideAttrs (old: { patches = [ # Fix duplicate tag in doc (fetchpatch { @@ -423,21 +473,22 @@ self: super: { ]; }); - vim-codefmt = super.vim-codefmt.overrideAttrs(old: { + vim-codefmt = super.vim-codefmt.overrideAttrs (old: { dependencies = with super; [ vim-maktaba ]; }); - vim-dasht = super.vim-dasht.overrideAttrs(old: { + vim-dasht = super.vim-dasht.overrideAttrs (old: { preFixup = '' substituteInPlace $out/share/vim-plugins/vim-dasht/autoload/dasht.vim \ --replace "['dasht']" "['${dasht}/bin/dasht']" ''; }); - vim-easytags = super.vim-easytags.overrideAttrs(old: { + vim-easytags = super.vim-easytags.overrideAttrs (old: { dependencies = with super; [ vim-misc ]; patches = [ - (fetchpatch { # https://github.com/xolox/vim-easytags/pull/170 fix version detection for universal-ctags + (fetchpatch { + # https://github.com/xolox/vim-easytags/pull/170 fix version detection for universal-ctags url = "https://github.com/xolox/vim-easytags/commit/46e4709500ba3b8e6cf3e90aeb95736b19e49be9.patch"; sha256 = "0x0xabb56xkgdqrg1mpvhbi3yw4d829n73lsnnyj5yrxjffy4ax4"; }) @@ -447,36 +498,38 @@ self: super: { # change the go_bin_path to point to a path in the nix store. See the code in # fatih/vim-go here # https://github.com/fatih/vim-go/blob/155836d47052ea9c9bac81ba3e937f6f22c8e384/autoload/go/path.vim#L154-L159 - vim-go = super.vim-go.overrideAttrs(old: let - binPath = lib.makeBinPath [ - asmfmt - delve - errcheck - go-motion - go-tools - gocode - gocode-gomod - godef - gogetdoc - golint - golangci-lint - gomodifytags - gopls - gotags - gotools - iferr - impl - reftools - ]; - in { - postPatch = '' - ${gnused}/bin/sed \ - -Ee 's@"go_bin_path", ""@"go_bin_path", "${binPath}"@g' \ - -i autoload/go/config.vim - ''; - }); + vim-go = super.vim-go.overrideAttrs (old: + let + binPath = lib.makeBinPath [ + asmfmt + delve + errcheck + go-motion + go-tools + gocode + gocode-gomod + godef + gogetdoc + golint + golangci-lint + gomodifytags + gopls + gotags + gotools + iferr + impl + reftools + ]; + in + { + postPatch = '' + ${gnused}/bin/sed \ + -Ee 's@"go_bin_path", ""@"go_bin_path", "${binPath}"@g' \ + -i autoload/go/config.vim + ''; + }); - vim-grammarous = super.vim-grammarous.overrideAttrs(old: { + vim-grammarous = super.vim-grammarous.overrideAttrs (old: { # use `:GrammarousCheck` to initialize checking # In neovim, you also want to use set # let g:grammarous#show_first_error = 1 @@ -489,7 +542,7 @@ self: super: { ]; }); - lens-vim = super.lens-vim.overrideAttrs(old: { + lens-vim = super.lens-vim.overrideAttrs (old: { # remove duplicate g:lens#animate in doc/lens.txt # https://github.com/NixOS/nixpkgs/pull/105810#issuecomment-740007985 # https://github.com/camspiers/lens.vim/pull/40/files @@ -501,11 +554,11 @@ self: super: { ]; }); - vim-hier = super.vim-hier.overrideAttrs(old: { + vim-hier = super.vim-hier.overrideAttrs (old: { buildInputs = [ vim ]; }); - vim-isort = super.vim-isort.overrideAttrs(old: { + vim-isort = super.vim-isort.overrideAttrs (old: { postPatch = '' substituteInPlace ftplugin/python_vimisort.vim \ --replace 'import vim' 'import vim; import sys; sys.path.append("${python.pkgs.isort}/${python.sitePackages}")' @@ -513,38 +566,39 @@ self: super: { }); vim-markdown-composer = - let - vim-markdown-composer-bin = rustPlatform.buildRustPackage rec { - pname = "vim-markdown-composer-bin"; - inherit (super.vim-markdown-composer) src version; - cargoSha256 = "iuhq2Zhdkib8hw4uvXBjwE5ZiN1kzairlzufaGuVkWc="; - }; - in super.vim-markdown-composer.overrideAttrs(oldAttrs: rec { - preFixup = '' - substituteInPlace "$out"/share/vim-plugins/vim-markdown-composer/after/ftplugin/markdown/composer.vim \ - --replace "let l:args = [s:plugin_root . '/target/release/markdown-composer']" \ - "let l:args = ['${vim-markdown-composer-bin}/bin/markdown-composer']" - ''; - }); + let + vim-markdown-composer-bin = rustPlatform.buildRustPackage rec { + pname = "vim-markdown-composer-bin"; + inherit (super.vim-markdown-composer) src version; + cargoSha256 = "iuhq2Zhdkib8hw4uvXBjwE5ZiN1kzairlzufaGuVkWc="; + }; + in + super.vim-markdown-composer.overrideAttrs (oldAttrs: rec { + preFixup = '' + substituteInPlace "$out"/share/vim-plugins/vim-markdown-composer/after/ftplugin/markdown/composer.vim \ + --replace "let l:args = [s:plugin_root . '/target/release/markdown-composer']" \ + "let l:args = ['${vim-markdown-composer-bin}/bin/markdown-composer']" + ''; + }); - vim-metamath = super.vim-metamath.overrideAttrs(old: { + vim-metamath = super.vim-metamath.overrideAttrs (old: { preInstall = "cd vim"; }); - vim-snipmate = super.vim-snipmate.overrideAttrs(old: { + vim-snipmate = super.vim-snipmate.overrideAttrs (old: { dependencies = with super; [ vim-addon-mw-utils tlib_vim ]; }); - vim-wakatime = super.vim-wakatime.overrideAttrs(old: { + vim-wakatime = super.vim-wakatime.overrideAttrs (old: { buildInputs = [ python ]; }); - vim-xdebug = super.vim-xdebug.overrideAttrs(old: { + vim-xdebug = super.vim-xdebug.overrideAttrs (old: { postInstall = false; }); - vim-xkbswitch = super.vim-xkbswitch.overrideAttrs(old: { + vim-xkbswitch = super.vim-xkbswitch.overrideAttrs (old: { patchPhase = '' substituteInPlace plugin/xkbswitch.vim \ --replace /usr/local/lib/libxkbswitch.so ${xkb-switch}/lib/libxkbswitch.so @@ -552,14 +606,14 @@ self: super: { buildInputs = [ xkb-switch ]; }); - vim-yapf = super.vim-yapf.overrideAttrs(old: { + vim-yapf = super.vim-yapf.overrideAttrs (old: { buildPhase = '' substituteInPlace ftplugin/python_yapf.vim \ --replace '"yapf"' '"${python3.pkgs.yapf}/bin/yapf"' ''; }); - vimproc-vim = super.vimproc-vim.overrideAttrs(old: { + vimproc-vim = super.vimproc-vim.overrideAttrs (old: { buildInputs = [ which ]; buildPhase = '' @@ -571,11 +625,11 @@ self: super: { ''; }); - YankRing-vim = super.YankRing-vim.overrideAttrs(old: { + YankRing-vim = super.YankRing-vim.overrideAttrs (old: { sourceRoot = "."; }); - YouCompleteMe = super.YouCompleteMe.overrideAttrs(old: { + YouCompleteMe = super.YouCompleteMe.overrideAttrs (old: { buildPhase = '' substituteInPlace plugin/youcompleteme.vim \ --replace "'ycm_path_to_python_interpreter', '''" \ @@ -594,7 +648,7 @@ self: super: { }; }); - jedi-vim = super.jedi-vim.overrideAttrs(old: { + jedi-vim = super.jedi-vim.overrideAttrs (old: { # checking for python3 support in vim would be neat, too, but nobody else seems to care buildInputs = [ python3.pkgs.jedi ]; meta = { @@ -603,7 +657,7 @@ self: super: { }; }); - lf-vim = super.lf-vim.overrideAttrs(old: { + lf-vim = super.lf-vim.overrideAttrs (old: { dependencies = with super; [ bclose-vim ]; }); @@ -615,7 +669,7 @@ self: super: { ''; }); - vCoolor-vim = super.vCoolor-vim.overrideAttrs(old: { + vCoolor-vim = super.vCoolor-vim.overrideAttrs (old: { # on linux can use either Zenity or Yad. propagatedBuildInputs = [ gnome3.zenity ]; meta = { @@ -624,12 +678,14 @@ self: super: { }; }); - unicode-vim = let - unicode-data = fetchurl { - url = "http://www.unicode.org/Public/UNIDATA/UnicodeData.txt"; - sha256 = "16b0jzvvzarnlxdvs2izd5ia0ipbd87md143dc6lv6xpdqcs75s9"; - }; - in super.unicode-vim.overrideAttrs(old: { + unicode-vim = + let + unicode-data = fetchurl { + url = "http://www.unicode.org/Public/UNIDATA/UnicodeData.txt"; + sha256 = "16b0jzvvzarnlxdvs2izd5ia0ipbd87md143dc6lv6xpdqcs75s9"; + }; + in + super.unicode-vim.overrideAttrs (old: { # redirect to /dev/null else changes terminal color buildPhase = '' @@ -637,51 +693,55 @@ self: super: { echo "Building unicode cache" ${vim}/bin/vim --cmd ":set rtp^=$PWD" -c 'ru plugin/unicode.vim' -c 'UnicodeCache' -c ':echohl Normal' -c ':q' > /dev/null ''; - }); + }); - vim-hexokinase = super.vim-hexokinase.overrideAttrs(old: { - preFixup = let - hexokinase = buildGoModule { - name = "hexokinase"; - src = old.src + "/hexokinase"; - vendorSha256 = "pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="; - }; - in '' - ln -s ${hexokinase}/bin/hexokinase $target/hexokinase/hexokinase - ''; + vim-hexokinase = super.vim-hexokinase.overrideAttrs (old: { + preFixup = + let + hexokinase = buildGoModule { + name = "hexokinase"; + src = old.src + "/hexokinase"; + vendorSha256 = "pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="; + }; + in + '' + ln -s ${hexokinase}/bin/hexokinase $target/hexokinase/hexokinase + ''; meta.platforms = lib.platforms.all; }); - vim-clap = super.vim-clap.overrideAttrs(old: { - preFixup = let - maple-bin = rustPlatform.buildRustPackage { - name = "maple"; - src = old.src; + vim-clap = super.vim-clap.overrideAttrs (old: { + preFixup = + let + maple-bin = rustPlatform.buildRustPackage { + name = "maple"; + src = old.src; - nativeBuildInputs = [ - pkg-config - ]; + nativeBuildInputs = [ + pkg-config + ]; - buildInputs = [ - openssl - ] ++ lib.optionals stdenv.isDarwin [ - CoreServices - curl - libgit2 - libiconv - ]; + buildInputs = [ + openssl + ] ++ lib.optionals stdenv.isDarwin [ + CoreServices + curl + libgit2 + libiconv + ]; - cargoSha256 = "mq5q+cIWXDMeoZfumX1benulrP/AWKZnd8aI0OzY55c="; - }; - in '' - ln -s ${maple-bin}/bin/maple $target/bin/maple - ''; + cargoSha256 = "mq5q+cIWXDMeoZfumX1benulrP/AWKZnd8aI0OzY55c="; + }; + in + '' + ln -s ${maple-bin}/bin/maple $target/bin/maple + ''; meta.platforms = lib.platforms.all; }); - completion-tabnine = super.completion-tabnine.overrideAttrs(old: { + completion-tabnine = super.completion-tabnine.overrideAttrs (old: { buildInputs = [ tabnine ]; postFixup = '' @@ -690,7 +750,7 @@ self: super: { ''; }); - telescope-frecency-nvim = super.telescope-frecency-nvim.overrideAttrs(old: { + telescope-frecency-nvim = super.telescope-frecency-nvim.overrideAttrs (old: { dependencies = [ self.sql-nvim ]; });