From 23e50a8eb71e6ffa6af4bfd3d65eb813048b0e5d Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Sat, 17 May 2025 10:48:27 -0400 Subject: [PATCH] fix: noBuildPlug naming --- modules/wrapper/build/config.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index 00ad2305..dd22bed8 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -7,23 +7,20 @@ }: let inherit (pkgs) vimPlugins; inherit (lib.trivial) flip; - inherit (builtins) path filter isString; + inherit (builtins) filter isString; getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name}; noBuildPlug = pname: let pin = getPin pname; - version = pin.revision or "dirty"; - in { - # vim.lazy.plugins relies on pname, so we only set that here - # version isn't needed for anything, but inherit it anyway for correctness - inherit pname version; - outPath = path { - name = "${pname}-0-unstable-${version}"; - path = pin.outPath; + version = builtins.substring 0 8 pin.revision; + in + pin.outPath.overrideAttrs { + inherit pname version; + name = "${pname}-${version}"; + + passthru.vimPlugin = false; }; - passthru.vimPlugin = false; - }; # build a vim plugin with the given name and arguments # if the plugin is nvim-treesitter, warn the user to use buildTreesitterPlug