Commit 323012ce authored by Silvan Mosberger's avatar Silvan Mosberger Committed by Silvan Mosberger
Browse files

vimPluginsUpdater: Format files with nixfmt

This is a rare case of a Nix file actually ending up in the build result.
We reformat this now, causing a rebuild, so that we won't cause a rebuild
in the treewide reformatting PR.
parent 65e71430
Loading
Loading
Loading
Loading
+21 −12
Original line number Diff line number Diff line
@@ -6,14 +6,23 @@ let
  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 {
  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;
      }
    else
      null;
  checksums = lib.mapAttrs getChecksum generated;
in
lib.filterAttrs (n: v: v != null) checksums