mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-17 18:34:38 +00:00
0ab2c96429
the `from2Nix` suffix is a legacy from vim2nix but we dont use that anymore. It makes the name of the function unusual and long.
20 lines
676 B
Nix
20 lines
676 B
Nix
with import <localpkgs> {};
|
|
let
|
|
inherit (vimUtils.override {inherit vim;}) buildVimPlugin;
|
|
inherit (neovimUtils) buildNeovimPlugin;
|
|
|
|
generated = callPackage <localpkgs/pkgs/applications/editors/vim/plugins/generated.nix> {
|
|
inherit buildNeovimPlugin buildVimPlugin;
|
|
} {} {};
|
|
hasChecksum = value:
|
|
lib.isAttrs value && lib.hasAttrByPath ["src" "outputHash"] value;
|
|
getChecksum = name: value:
|
|
if hasChecksum value then {
|
|
submodules = value.src.fetchSubmodules or false;
|
|
sha256 = value.src.outputHash;
|
|
rev = value.src.rev;
|
|
} else null;
|
|
checksums = lib.mapAttrs getChecksum generated;
|
|
in
|
|
lib.filterAttrs (n: v: v != null) checksums
|