From bb350e4a177880b588d990074be5561026483592 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 23 Dec 2022 12:23:57 -0500 Subject: [PATCH 1/3] vimUtils.buildVimPlugin: set meta.platforms --- pkgs/applications/editors/vim/plugins/build-vim-plugin.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix index 66234c2c198e..42eacb29ca5e 100644 --- a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix +++ b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix @@ -25,6 +25,7 @@ rec { postInstall ? "", path ? ".", addonInfo ? null, + meta ? { }, ... }: let drv = stdenv.mkDerivation (attrs // { @@ -41,6 +42,10 @@ rec { runHook postInstall ''; + + meta = { + platforms = lib.platforms.all; + } // meta; }); in addRtp (toVimPlugin drv); From 2579a9877a3143438c1684045035eb24f2b70979 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 23 Dec 2022 12:34:32 -0500 Subject: [PATCH 2/3] vimUtils.buildVimPlugin: format --- .../editors/vim/plugins/build-vim-plugin.nix | 69 +++++++++---------- .../editors/vim/plugins/vim-utils.nix | 3 +- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix index 42eacb29ca5e..20641908115c 100644 --- a/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix +++ b/pkgs/applications/editors/vim/plugins/build-vim-plugin.nix @@ -1,9 +1,6 @@ -{ lib, stdenv +{ lib +, stdenv , rtpPath -, vim -, vimCommandCheckHook -, vimGenDocHook -, neovimRequireCheckHook , toVimPlugin }: @@ -14,44 +11,46 @@ rec { overrideAttrs = f: addRtp (drv.overrideAttrs f); }; - buildVimPlugin = attrs@{ - name ? "${attrs.pname}-${attrs.version}", - namePrefix ? "vimplugin-", - src, - unpackPhase ? "", - configurePhase ? "", - buildPhase ? "", - preInstall ? "", - postInstall ? "", - path ? ".", - addonInfo ? null, - meta ? { }, - ... - }: - let drv = stdenv.mkDerivation (attrs // { - name = namePrefix + name; + buildVimPlugin = + { name ? "${attrs.pname}-${attrs.version}" + , namePrefix ? "vimplugin-" + , src + , unpackPhase ? "" + , configurePhase ? "" + , buildPhase ? "" + , preInstall ? "" + , postInstall ? "" + , path ? "." + , addonInfo ? null + , meta ? { } + , ... + }@attrs: + let + drv = stdenv.mkDerivation (attrs // { + name = namePrefix + name; - inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; + inherit unpackPhase configurePhase buildPhase addonInfo preInstall postInstall; - installPhase = '' - runHook preInstall + installPhase = '' + runHook preInstall - target=$out/${rtpPath}/${path} - mkdir -p $out/${rtpPath} - cp -r . $target + target=$out/${rtpPath}/${path} + mkdir -p $out/${rtpPath} + cp -r . $target - runHook postInstall - ''; + runHook postInstall + ''; - meta = { - platforms = lib.platforms.all; - } // meta; - }); - in addRtp (toVimPlugin drv); + meta = { + platforms = lib.platforms.all; + } // meta; + }); + in + addRtp (toVimPlugin drv); buildVimPluginFrom2Nix = attrs: buildVimPlugin ({ # vim plugins may override this buildPhase = ":"; - configurePhase =":"; + configurePhase = ":"; } // attrs); } diff --git a/pkgs/applications/editors/vim/plugins/vim-utils.nix b/pkgs/applications/editors/vim/plugins/vim-utils.nix index 6607ff2b8c43..4235aa5e929e 100644 --- a/pkgs/applications/editors/vim/plugins/vim-utils.nix +++ b/pkgs/applications/editors/vim/plugins/vim-utils.nix @@ -391,8 +391,7 @@ rec { } ./neovim-require-check-hook.sh) {}; inherit (import ./build-vim-plugin.nix { - inherit lib stdenv rtpPath vim vimGenDocHook - toVimPlugin vimCommandCheckHook neovimRequireCheckHook; + inherit lib stdenv rtpPath toVimPlugin; }) buildVimPlugin buildVimPluginFrom2Nix; From df5b5a8e788cf83fbaba45f55c9a965a999afad9 Mon Sep 17 00:00:00 2001 From: figsoda Date: Fri, 23 Dec 2022 14:07:28 -0500 Subject: [PATCH 3/3] vimPlugins.vim-markdown-composer: fix build on darwin --- pkgs/applications/editors/vim/plugins/overrides.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index 20b3d8bcafc4..849c152fbaf0 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1151,6 +1151,8 @@ self: super: { pname = "vim-markdown-composer-bin"; inherit (super.vim-markdown-composer) src version; cargoSha256 = "sha256-Vie8vLTplhaVU4E9IohvxERfz3eBpd62m8/1Ukzk8e4="; + # tests require network access + doCheck = false; }; in super.vim-markdown-composer.overrideAttrs (old: {