From 3f19fc37a3557d31b242b220b52c7a1358572f57 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Wed, 16 Feb 2022 11:55:43 -0300 Subject: Move misc/vim-plugins to applications/editors/vim/plugins --- pkgs/applications/editors/vim/plugins/default.nix | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/applications/editors/vim/plugins/default.nix (limited to 'pkgs/applications/editors/vim/plugins/default.nix') diff --git a/pkgs/applications/editors/vim/plugins/default.nix b/pkgs/applications/editors/vim/plugins/default.nix new file mode 100644 index 0000000000000..9bfcf44318637 --- /dev/null +++ b/pkgs/applications/editors/vim/plugins/default.nix @@ -0,0 +1,47 @@ +# TODO check that no license information gets lost +{ callPackage, config, lib, vimUtils, vim, darwin, llvmPackages, luaPackages }: + +let + + inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix vimGenDocHook; + + inherit (lib) extends; + + initialPackages = self: { + # Convert derivation to a vim plugin. + toVimPlugin = drv: + drv.overrideAttrs(oldAttrs: { + + nativeBuildInputs = oldAttrs.nativeBuildInputs or [] ++ [ vimGenDocHook ]; + passthru = (oldAttrs.passthru or {}) // { + vimPlugin = true; + }; + }); + }; + + plugins = callPackage ./generated.nix { + inherit buildVimPluginFrom2Nix; + }; + + # TL;DR + # * Add your plugin to ./vim-plugin-names + # * run ./update.py + # + # If additional modifications to the build process are required, + # add to ./overrides.nix. + overrides = callPackage ./overrides.nix { + inherit (darwin.apple_sdk.frameworks) Cocoa CoreFoundation CoreServices; + inherit buildVimPluginFrom2Nix; + inherit llvmPackages luaPackages; + }; + + aliases = if (config.allowAliases or true) then (import ./aliases.nix lib) else final: prev: {}; + + extensible-self = lib.makeExtensible + (extends aliases + (extends overrides + (extends plugins initialPackages) + ) + ); +in + extensible-self -- cgit 1.4.1