From 323012ced25175532e2aa979f1cd6243f7a8ae92 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 12 Jul 2024 04:14:07 +0200 Subject: [PATCH] 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. --- .../editors/vim/plugins/get-plugins.nix | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/get-plugins.nix b/pkgs/applications/editors/vim/plugins/get-plugins.nix index 06ed71f37924..6c587a94821f 100644 --- a/pkgs/applications/editors/vim/plugins/get-plugins.nix +++ b/pkgs/applications/editors/vim/plugins/get-plugins.nix @@ -1,19 +1,28 @@ -with import {}; +with import { }; let - inherit (vimUtils.override {inherit vim;}) buildVimPlugin; + inherit (vimUtils.override { inherit vim; }) buildVimPlugin; inherit (neovimUtils) buildNeovimPlugin; generated = callPackage { 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; + } { } { }; + 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 +lib.filterAttrs (n: v: v != null) checksums