diff options
author | Timo Kaufmann <timokau@zoho.com> | 2018-12-24 13:13:59 +0100 |
---|---|---|
committer | Timo Kaufmann <timokau@zoho.com> | 2018-12-24 23:41:44 +0100 |
commit | 8e8a09bfc9546edca6623f713bd1be2cb544da21 (patch) | |
tree | 4de27ec5f6e2a499ed6510835e59a4c5d22c5002 /pkgs/misc/vim-plugins | |
parent | b352318cd11d67d49ddb6d1c0cb2cea786e08b46 (diff) | |
download | nixlib-8e8a09bfc9546edca6623f713bd1be2cb544da21.tar nixlib-8e8a09bfc9546edca6623f713bd1be2cb544da21.tar.gz nixlib-8e8a09bfc9546edca6623f713bd1be2cb544da21.tar.bz2 nixlib-8e8a09bfc9546edca6623f713bd1be2cb544da21.tar.lz nixlib-8e8a09bfc9546edca6623f713bd1be2cb544da21.tar.xz nixlib-8e8a09bfc9546edca6623f713bd1be2cb544da21.tar.zst nixlib-8e8a09bfc9546edca6623f713bd1be2cb544da21.zip |
vimUtils: add dependency logic to nativeImpl
nativeImpl previously simply ignored dependency information.
Diffstat (limited to 'pkgs/misc/vim-plugins')
-rw-r--r-- | pkgs/misc/vim-plugins/vim-utils.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 59d1a980e88c..a8146dbf5d44 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -293,8 +293,18 @@ let (let link = (packageName: dir: pluginPath: "ln -sf ${pluginPath}/share/vim-plugins/* $out/pack/${packageName}/${dir}"); packageLinks = (packageName: {start ? [], opt ? []}: + let + # `nativeImpl` expects packages to be derivations, not strings (as + # opposed to older implementations that have to maintain backwards + # compatibility). Therefore we don't need to deal with "knownPlugins" + # and can simply pass `null`. + depsOfOptionalPlugins = lib.subtractLists opt (findDependenciesRecursively null opt); + startWithDeps = findDependenciesRecursively null start; + in ["mkdir -p $out/pack/${packageName}/start"] - ++ (builtins.map (link packageName "start") start) + # To avoid confusion, even dependencies of optional plugins are added + # to `start` (except if they are explicitly listed as optional plugins). + ++ (builtins.map (link packageName "start") (lib.unique (startWithDeps ++ depsOfOptionalPlugins))) ++ ["mkdir -p $out/pack/${packageName}/opt"] ++ (builtins.map (link packageName "opt") opt) ); |