vimPlugins: format overrides.nix with nixpkgs-fmt 1.0
This commit is contained in:
parent
837b4d86ba
commit
360d4c3073
@ -1,16 +1,45 @@
|
|||||||
{ lib, stdenv
|
{ lib
|
||||||
, python, cmake, meson, vim, ruby
|
, stdenv
|
||||||
, which, fetchFromGitHub, fetchgit, fetchurl, fetchzip, fetchpatch
|
, python
|
||||||
, llvmPackages, rustPlatform, buildGoModule
|
, cmake
|
||||||
, pkg-config, curl, openssl, libgit2, libiconv
|
, meson
|
||||||
, xkb-switch, fzf, skim, stylish-haskell
|
, vim
|
||||||
, python3, boost, icu, ncurses
|
, ruby
|
||||||
, ycmd, rake
|
, which
|
||||||
, gobject-introspection, glib, wrapGAppsHook
|
, 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
|
, substituteAll
|
||||||
, languagetool
|
, languagetool
|
||||||
, tabnine
|
, tabnine
|
||||||
, Cocoa, CoreFoundation, CoreServices
|
|
||||||
|
, Cocoa
|
||||||
|
, CoreFoundation
|
||||||
|
, CoreServices
|
||||||
|
|
||||||
, buildVimPluginFrom2Nix
|
, buildVimPluginFrom2Nix
|
||||||
, nodePackages
|
, nodePackages
|
||||||
, dasht
|
, dasht
|
||||||
@ -21,10 +50,24 @@
|
|||||||
, khard
|
, khard
|
||||||
|
|
||||||
# vim-go dependencies
|
# vim-go dependencies
|
||||||
, asmfmt, delve, errcheck, godef, golint
|
, asmfmt
|
||||||
, gomodifytags, gotags, gotools, go-motion
|
, delve
|
||||||
, gnused, reftools, gogetdoc, golangci-lint
|
, errcheck
|
||||||
, impl, iferr, gocode, gocode-gomod, go-tools
|
, godef
|
||||||
|
, golint
|
||||||
|
, gomodifytags
|
||||||
|
, gotags
|
||||||
|
, gotools
|
||||||
|
, go-motion
|
||||||
|
, gnused
|
||||||
|
, reftools
|
||||||
|
, gogetdoc
|
||||||
|
, golangci-lint
|
||||||
|
, impl
|
||||||
|
, iferr
|
||||||
|
, gocode
|
||||||
|
, gocode-gomod
|
||||||
|
, go-tools
|
||||||
, gopls
|
, gopls
|
||||||
|
|
||||||
# direnv-vim dependencies
|
# direnv-vim dependencies
|
||||||
@ -61,7 +104,8 @@ self: super: {
|
|||||||
src = skim.vim;
|
src = skim.vim;
|
||||||
};
|
};
|
||||||
|
|
||||||
LanguageClient-neovim = let
|
LanguageClient-neovim =
|
||||||
|
let
|
||||||
version = "0.1.160";
|
version = "0.1.160";
|
||||||
LanguageClient-neovim-src = fetchFromGitHub {
|
LanguageClient-neovim-src = fetchFromGitHub {
|
||||||
owner = "autozimu";
|
owner = "autozimu";
|
||||||
@ -83,7 +127,8 @@ self: super: {
|
|||||||
export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS"
|
export NIX_LDFLAGS="-F${CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in buildVimPluginFrom2Nix {
|
in
|
||||||
|
buildVimPluginFrom2Nix {
|
||||||
pname = "LanguageClient-neovim";
|
pname = "LanguageClient-neovim";
|
||||||
inherit version;
|
inherit version;
|
||||||
src = LanguageClient-neovim-src;
|
src = LanguageClient-neovim-src;
|
||||||
@ -196,7 +241,9 @@ self: super: {
|
|||||||
dependencies = with super; [ super.self ];
|
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
|
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 {
|
nimpy = fetchFromGitHub {
|
||||||
owner = "yglukhov";
|
owner = "yglukhov";
|
||||||
repo = "nimpy";
|
repo = "nimpy";
|
||||||
@ -209,7 +256,8 @@ self: super: {
|
|||||||
rev = "c38039309cb11391112571aa332df9c55f625b54";
|
rev = "c38039309cb11391112571aa332df9c55f625b54";
|
||||||
sha256 = "05xdy13vm5n8dw2i366ppbznc4cfhq23rdcklisbaklz2jhdx352";
|
sha256 = "05xdy13vm5n8dw2i366ppbznc4cfhq23rdcklisbaklz2jhdx352";
|
||||||
};
|
};
|
||||||
in super.fruzzy.overrideAttrs(old: {
|
in
|
||||||
|
super.fruzzy.overrideAttrs (old: {
|
||||||
buildInputs = [ nim ];
|
buildInputs = [ nim ];
|
||||||
patches = [
|
patches = [
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
@ -303,7 +351,8 @@ self: super: {
|
|||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
sved = let
|
sved =
|
||||||
|
let
|
||||||
# we put the script in its own derivation to benefit the magic of wrapGAppsHook
|
# we put the script in its own derivation to benefit the magic of wrapGAppsHook
|
||||||
svedbackend = stdenv.mkDerivation {
|
svedbackend = stdenv.mkDerivation {
|
||||||
name = "svedbackend-${super.sved.name}";
|
name = "svedbackend-${super.sved.name}";
|
||||||
@ -385,7 +434,8 @@ self: super: {
|
|||||||
vim-addon-goto-thing-at-cursor
|
vim-addon-goto-thing-at-cursor
|
||||||
vim-addon-errorformats
|
vim-addon-errorformats
|
||||||
vim-addon-actions
|
vim-addon-actions
|
||||||
vim-addon-mw-utils tlib_vim
|
vim-addon-mw-utils
|
||||||
|
tlib_vim
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -437,7 +487,8 @@ self: super: {
|
|||||||
vim-easytags = super.vim-easytags.overrideAttrs (old: {
|
vim-easytags = super.vim-easytags.overrideAttrs (old: {
|
||||||
dependencies = with super; [ vim-misc ];
|
dependencies = with super; [ vim-misc ];
|
||||||
patches = [
|
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";
|
url = "https://github.com/xolox/vim-easytags/commit/46e4709500ba3b8e6cf3e90aeb95736b19e49be9.patch";
|
||||||
sha256 = "0x0xabb56xkgdqrg1mpvhbi3yw4d829n73lsnnyj5yrxjffy4ax4";
|
sha256 = "0x0xabb56xkgdqrg1mpvhbi3yw4d829n73lsnnyj5yrxjffy4ax4";
|
||||||
})
|
})
|
||||||
@ -447,7 +498,8 @@ self: super: {
|
|||||||
# change the go_bin_path to point to a path in the nix store. See the code in
|
# change the go_bin_path to point to a path in the nix store. See the code in
|
||||||
# fatih/vim-go here
|
# fatih/vim-go here
|
||||||
# https://github.com/fatih/vim-go/blob/155836d47052ea9c9bac81ba3e937f6f22c8e384/autoload/go/path.vim#L154-L159
|
# https://github.com/fatih/vim-go/blob/155836d47052ea9c9bac81ba3e937f6f22c8e384/autoload/go/path.vim#L154-L159
|
||||||
vim-go = super.vim-go.overrideAttrs(old: let
|
vim-go = super.vim-go.overrideAttrs (old:
|
||||||
|
let
|
||||||
binPath = lib.makeBinPath [
|
binPath = lib.makeBinPath [
|
||||||
asmfmt
|
asmfmt
|
||||||
delve
|
delve
|
||||||
@ -468,7 +520,8 @@ self: super: {
|
|||||||
impl
|
impl
|
||||||
reftools
|
reftools
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
${gnused}/bin/sed \
|
${gnused}/bin/sed \
|
||||||
-Ee 's@"go_bin_path", ""@"go_bin_path", "${binPath}"@g' \
|
-Ee 's@"go_bin_path", ""@"go_bin_path", "${binPath}"@g' \
|
||||||
@ -519,7 +572,8 @@ self: super: {
|
|||||||
inherit (super.vim-markdown-composer) src version;
|
inherit (super.vim-markdown-composer) src version;
|
||||||
cargoSha256 = "iuhq2Zhdkib8hw4uvXBjwE5ZiN1kzairlzufaGuVkWc=";
|
cargoSha256 = "iuhq2Zhdkib8hw4uvXBjwE5ZiN1kzairlzufaGuVkWc=";
|
||||||
};
|
};
|
||||||
in super.vim-markdown-composer.overrideAttrs(oldAttrs: rec {
|
in
|
||||||
|
super.vim-markdown-composer.overrideAttrs (oldAttrs: rec {
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
substituteInPlace "$out"/share/vim-plugins/vim-markdown-composer/after/ftplugin/markdown/composer.vim \
|
substituteInPlace "$out"/share/vim-plugins/vim-markdown-composer/after/ftplugin/markdown/composer.vim \
|
||||||
--replace "let l:args = [s:plugin_root . '/target/release/markdown-composer']" \
|
--replace "let l:args = [s:plugin_root . '/target/release/markdown-composer']" \
|
||||||
@ -624,12 +678,14 @@ self: super: {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
unicode-vim = let
|
unicode-vim =
|
||||||
|
let
|
||||||
unicode-data = fetchurl {
|
unicode-data = fetchurl {
|
||||||
url = "http://www.unicode.org/Public/UNIDATA/UnicodeData.txt";
|
url = "http://www.unicode.org/Public/UNIDATA/UnicodeData.txt";
|
||||||
sha256 = "16b0jzvvzarnlxdvs2izd5ia0ipbd87md143dc6lv6xpdqcs75s9";
|
sha256 = "16b0jzvvzarnlxdvs2izd5ia0ipbd87md143dc6lv6xpdqcs75s9";
|
||||||
};
|
};
|
||||||
in super.unicode-vim.overrideAttrs(old: {
|
in
|
||||||
|
super.unicode-vim.overrideAttrs (old: {
|
||||||
|
|
||||||
# redirect to /dev/null else changes terminal color
|
# redirect to /dev/null else changes terminal color
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
@ -640,13 +696,15 @@ self: super: {
|
|||||||
});
|
});
|
||||||
|
|
||||||
vim-hexokinase = super.vim-hexokinase.overrideAttrs (old: {
|
vim-hexokinase = super.vim-hexokinase.overrideAttrs (old: {
|
||||||
preFixup = let
|
preFixup =
|
||||||
|
let
|
||||||
hexokinase = buildGoModule {
|
hexokinase = buildGoModule {
|
||||||
name = "hexokinase";
|
name = "hexokinase";
|
||||||
src = old.src + "/hexokinase";
|
src = old.src + "/hexokinase";
|
||||||
vendorSha256 = "pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
vendorSha256 = "pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
||||||
};
|
};
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
ln -s ${hexokinase}/bin/hexokinase $target/hexokinase/hexokinase
|
ln -s ${hexokinase}/bin/hexokinase $target/hexokinase/hexokinase
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -654,7 +712,8 @@ self: super: {
|
|||||||
});
|
});
|
||||||
|
|
||||||
vim-clap = super.vim-clap.overrideAttrs (old: {
|
vim-clap = super.vim-clap.overrideAttrs (old: {
|
||||||
preFixup = let
|
preFixup =
|
||||||
|
let
|
||||||
maple-bin = rustPlatform.buildRustPackage {
|
maple-bin = rustPlatform.buildRustPackage {
|
||||||
name = "maple";
|
name = "maple";
|
||||||
src = old.src;
|
src = old.src;
|
||||||
@ -674,7 +733,8 @@ self: super: {
|
|||||||
|
|
||||||
cargoSha256 = "mq5q+cIWXDMeoZfumX1benulrP/AWKZnd8aI0OzY55c=";
|
cargoSha256 = "mq5q+cIWXDMeoZfumX1benulrP/AWKZnd8aI0OzY55c=";
|
||||||
};
|
};
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
ln -s ${maple-bin}/bin/maple $target/bin/maple
|
ln -s ${maple-bin}/bin/maple $target/bin/maple
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user