Github messages for voidlinux
 help / color / mirror / Atom feed
From: gbrlsnchs <gbrlsnchs@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] fzf: install fzf.vim to Neovim plugin directory
Date: Mon, 21 Sep 2020 17:08:25 +0200	[thread overview]
Message-ID: <20200921150825.lRGFwiiYItW6IzYRU54B49ykHn6Vt5CbRQxHiUhww7Q@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-21733@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 499 bytes --]

There is an updated pull request by gbrlsnchs against master on the void-packages repository

https://github.com/gbrlsnchs/void-packages fix-fzf-nvim
https://github.com/void-linux/void-packages/pull/21733

fzf: install fzf.vim to Neovim plugin directory
For Vim users, FZF works out of the box, but Neovim users have to
manually copy /usr/share/vim/vimfiles/plugin/fzf.vim to the proper
Neovim equivalent.

A patch file from https://github.com/void-linux/void-packages/pull/21733.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fix-fzf-nvim-21733.patch --]
[-- Type: text/x-diff, Size: 11368 bytes --]

From e56b4f031013c07d63d3095d210c1a12e9f8abef Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Mon, 21 Sep 2020 11:31:30 -0300
Subject: [PATCH 1/5] New package: btrfs_map_physical-git.0

---
 srcpkgs/btrfs_map_physical/template | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 srcpkgs/btrfs_map_physical/template

diff --git a/srcpkgs/btrfs_map_physical/template b/srcpkgs/btrfs_map_physical/template
new file mode 100644
index 00000000000..668fe49538a
--- /dev/null
+++ b/srcpkgs/btrfs_map_physical/template
@@ -0,0 +1,22 @@
+# Template file for 'btrfs_map_physical'
+pkgname=btrfs_map_physical
+version=git.0
+revision=1
+build_style=fetch
+hostmakedepends=""
+makedepends=""
+depends=""
+short_desc="Program to get physical offset of a file under btrfs"
+maintainer="Gabriel Sanches <gabriel@gsr.dev>"
+license="custom:unlicensed"
+homepage="https://github.com/osandov/osandov-linux"
+distfiles="https://raw.githubusercontent.com/osandov/osandov-linux/1e49d070bc01db1f2c32df4fc678f08a1c2392d5/scripts/btrfs_map_physical.c"
+checksum=9f55c0c4f020e194c0fa2716f40ac3bc8e8a92c085cd634684e014b36f3b02b7
+
+do_build() {
+	gcc -O2 -o ${pkgname} ${pkgname}.c
+}
+
+do_install() {
+	vbin ${pkgname}
+}

From 17cfc5e4a4c2257925188eb3b27f7b577f6a878d Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Sun, 20 Sep 2020 00:13:15 -0300
Subject: [PATCH 2/5] New package: lua-language-server-git.0

---
 srcpkgs/lua-language-server/files/wrapper     |   4 +
 .../patches/0001-Fix-paths.patch              | 126 ++++++++++++++++++
 srcpkgs/lua-language-server/template          |  45 +++++++
 3 files changed, 175 insertions(+)
 create mode 100644 srcpkgs/lua-language-server/files/wrapper
 create mode 100644 srcpkgs/lua-language-server/patches/0001-Fix-paths.patch
 create mode 100644 srcpkgs/lua-language-server/template

diff --git a/srcpkgs/lua-language-server/files/wrapper b/srcpkgs/lua-language-server/files/wrapper
new file mode 100644
index 00000000000..d61d05d05d4
--- /dev/null
+++ b/srcpkgs/lua-language-server/files/wrapper
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd /usr/share/@PKGNAME@
+exec /usr/lib/@PKGNAME@/@PKGNAME@ -E ./main.lua
diff --git a/srcpkgs/lua-language-server/patches/0001-Fix-paths.patch b/srcpkgs/lua-language-server/patches/0001-Fix-paths.patch
new file mode 100644
index 00000000000..ef7c35a1eea
--- /dev/null
+++ b/srcpkgs/lua-language-server/patches/0001-Fix-paths.patch
@@ -0,0 +1,126 @@
+diff --git a/main-beta.lua b/main-beta.lua
+index 1d1eecae..6a2a3e30 100644
+--- a/main-beta.lua
++++ b/main-beta.lua
+@@ -1,7 +1,11 @@
+ local currentPath = debug.getinfo(1, 'S').source:sub(2)
+ local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
+-loadfile(rootPath .. '/platform.lua')('script-beta')
++
++loadfile(rootPath .. '/platform.lua')(rootPath, 'script-beta')
++
++local math = require 'math'
+ local fs = require 'bee.filesystem'
++
+ ROOT = fs.path(rootPath)
+ LANG = LANG or 'en-US'
+ 
+@@ -9,7 +13,7 @@ collectgarbage('generational', 10, 50)
+ --collectgarbage('incremental', 120, 120, 0)
+ 
+ log = require 'log'
+-log.init(ROOT, ROOT / 'log' / 'service.log')
++log.init(ROOT, fs.path('/tmp/lua-language-server' .. math.random(1000, 9000)) / 'log' / 'service.log')
+ log.info('Lua Lsp startup, root: ', ROOT)
+ log.debug('ROOT:', ROOT:string())
+ 
+diff --git a/main.lua b/main.lua
+index b7c10ed5..6d3e4035 100644
+--- a/main.lua
++++ b/main.lua
+@@ -1,21 +1,27 @@
+ local currentPath = debug.getinfo(1, 'S').source:sub(2)
+ local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
+-loadfile(rootPath .. '/platform.lua')('script')
++
++loadfile(rootPath .. '/platform.lua')(rootPath, 'script')
++
++local math = require 'math'
+ local fs = require 'bee.filesystem'
++
++rootPath = fs.path(rootPath)
+ ROOT = fs.current_path() / rootPath
+ LANG = LANG or 'en-US'
++LOG_PATH = fs.path('/tmp/lua-lua-language-server' .. math.random(1000, 9000)) / 'log'
+ 
+ --collectgarbage('generational')
+ collectgarbage("setpause", 100)
+ collectgarbage("setstepmul", 1000)
+ 
+ log = require 'log'
+-log.init(ROOT, ROOT / 'log' / 'service.log')
++log.init(ROOT, LOG_PATH / 'service.log')
+ log.info('Lua Lsp startup, root: ', ROOT)
+ log.debug('ROOT:', ROOT:string())
+ ac = {}
+ 
+-xpcall(dofile, log.debug, rootPath .. '/debugger.lua')
++xpcall(dofile, log.debug, tostring(rootPath / 'debugger.lua'))
+ require 'utility'
+ local service = require 'service'
+ local session = service()
+diff --git a/platform.lua b/platform.lua
+index 46656fda..a1c1989c 100644
+--- a/platform.lua
++++ b/platform.lua
+@@ -1,4 +1,4 @@
+-local script = ...
++local rootPath, script = ...
+ 
+ local function findExePath()
+     local n = 0
+@@ -30,13 +30,7 @@ cpath:    %s
+ end
+ 
+ local fs = require 'bee.filesystem'
+-local rootPath = fs.path(exePath):parent_path():parent_path():remove_filename():string()
+-if dll == '.dll' then
+-    rootPath = rootPath:gsub('/', '\\')
+-    package.path  = rootPath .. script .. '\\?.lua'
+-          .. ';' .. rootPath .. script .. '\\?\\init.lua'
+-else
+-    rootPath = rootPath:gsub('\\', '/')
+-    package.path  = rootPath .. script .. '/?.lua'
+-          .. ';' .. rootPath .. script .. '/?/init.lua'
+-end
++rootPath = fs.absolute(fs.path(rootPath))
++
++package.path  = tostring(rootPath / script / '?.lua')
++      .. ';' .. tostring(rootPath / script / '?' / 'init.lua')
+diff --git a/script/workspace.lua b/script/workspace.lua
+index 75bc27a0..ba855700 100644
+--- a/script/workspace.lua
++++ b/script/workspace.lua
+@@ -187,7 +187,7 @@ function mt:init(rootUri)
+     end
+     log.info('Workspace inited, root: ', self.root)
+     log.info('Workspace inited, uri: ', rootUri)
+-    local logPath = ROOT / 'log' / (rootUri:gsub('[/:]+', '_') .. '.log')
++    local logPath = LOG_PATH / (rootUri:gsub('[/:]+', '_') .. '.log')
+     log.info('Log path: ', logPath)
+     log.init(ROOT, logPath)
+ end
+diff --git a/test.lua b/test.lua
+index 72178860..da8f46dc 100644
+--- a/test.lua
++++ b/test.lua
+@@ -3,16 +3,17 @@ local rootPath = currentPath:gsub('[^/\\]-$', '')
+ if rootPath == '' then
+     rootPath = './'
+ end
+-loadfile(rootPath .. 'platform.lua')('script')
++loadfile(rootPath .. 'platform.lua')(rootPath, 'script')
+ package.path  = package.path
+       .. ';' .. rootPath .. 'test/?.lua'
+       .. ';' .. rootPath .. 'test/?/init.lua'
+ local fs = require 'bee.filesystem'
+ ROOT = fs.absolute(fs.path(rootPath):parent_path())
+ LANG = 'en-US'
++LOG_PATH = ROOT / 'log'
+ 
+ log = require 'log'
+-log.init(ROOT, ROOT / 'log' / 'test.log')
++log.init(ROOT, LOG_PATH / 'test.log')
+ log.debug('测试开始')
+ ac = {}
+ 
diff --git a/srcpkgs/lua-language-server/template b/srcpkgs/lua-language-server/template
new file mode 100644
index 00000000000..df2e6802945
--- /dev/null
+++ b/srcpkgs/lua-language-server/template
@@ -0,0 +1,45 @@
+# Template file for 'lua-language-server'
+pkgname=lua-language-server
+version=git.0
+revision=1
+wrksrc=${pkgname}
+hostmakedepends="ninja git"
+depends="lua"
+short_desc="Lua Language Server coded by Lua"
+maintainer="Gabriel Sanches <gabriel@gsr.dev>"
+license="MIT"
+homepage="https://github.com/sumneko/lua-language-server"
+patch_args=-Np1
+
+do_fetch() {
+	git clone https://github.com/sumneko/${pkgname}.git ${wrksrc}
+	cd ${wrksrc}
+	git submodule update --init --recursive
+}
+
+do_build() {
+	cd ${wrksrc}/3rd/luamake
+	ninja -f ninja/linux.ninja
+	cd ../..
+	./3rd/luamake/luamake rebuild
+}
+
+do_install() {
+	vlicense LICENSE
+
+	# main script
+	vmkdir usr/lib/${pkgname}
+	vcopy "${wrksrc}/bin/Linux/*" usr/lib/${pkgname}
+
+	# entrypoint and files
+	vmkdir usr/share/${pkgname}
+	for script in main.lua script libs locale platform.lua; do
+		vcopy "${wrksrc}/${script}" usr/share/${pkgname}
+	done
+
+	vmkdir usr/bin
+	sed ${FILESDIR}/wrapper \
+		-e "s;@PKGNAME@;$pkgname;g" \
+		> ${DESTDIR}/usr/bin/${pkgname}
+	chmod 755 ${DESTDIR}/usr/bin/${pkgname}
+}

From cee4cac44b1be05a737e9472f1fa51ad477b6738 Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Fri, 17 Jul 2020 15:50:57 -0300
Subject: [PATCH 3/5] New package: rust-analyzer-2020.09.14

---
 srcpkgs/rust-analyzer/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/rust-analyzer/template

diff --git a/srcpkgs/rust-analyzer/template b/srcpkgs/rust-analyzer/template
new file mode 100644
index 00000000000..1361ce39766
--- /dev/null
+++ b/srcpkgs/rust-analyzer/template
@@ -0,0 +1,20 @@
+# Template file for 'rust-analyzer'
+pkgname=rust-analyzer
+version=2020.09.14
+revision=1
+_ver=${version//./-}
+wrksrc="${pkgname}-${_ver}"
+build_style=cargo
+make_install_args="--path=crates/${pkgname}"
+short_desc="Rust compiler front-end for IDEs"
+maintainer="Gabriel Sanches <gabriel@gsr.dev>"
+license="Apache-2.0, MIT"
+homepage="https://rust-analyzer.github.io/"
+distfiles="https://github.com/${pkgname}/${pkgname}/archive/${_ver}.tar.gz"
+checksum=162c0acac4c025e287deab7974340bf6147343495697ac72101cb8d56caab01e
+
+post_install() {
+	vlicense LICENSE-APACHE
+	vlicense LICENSE-MIT
+	vdoc README.md
+}

From 0e6dff508bfb22cb35398f37cefd6e861f5c8091 Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Mon, 4 May 2020 20:45:04 -0300
Subject: [PATCH 4/5] New package: pilgo-0.5.0

---
 srcpkgs/pilgo/template | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 srcpkgs/pilgo/template

diff --git a/srcpkgs/pilgo/template b/srcpkgs/pilgo/template
new file mode 100644
index 00000000000..c70540dba9e
--- /dev/null
+++ b/srcpkgs/pilgo/template
@@ -0,0 +1,17 @@
+# Template file for 'pilgo'
+pkgname=pilgo
+version=0.5.0
+revision=1
+build_style=go
+go_import_path="github.com/gbrlsnchs/pilgo/cmd/plg"
+go_ldflags="-X github.com/gbrlsnchs/pilgo/cmd/internal.version=${version}"
+short_desc="Configuration-based dotfiles manager"
+maintainer="Gabriel Sanches <gabriel@gsr.dev>"
+license="MIT"
+homepage="https://gsr.dev/pilgo"
+distfiles="https://github.com/gbrlsnchs/pilgo/archive/v${version}.tar.gz"
+checksum=4fefbc30e8d2568c04687613a611ac9f9864028add28b82b3912b9e267c20635
+
+post_install() {
+	vlicense LICENSE
+}

From baa6767bc808e5316bb3c530511222f946289356 Mon Sep 17 00:00:00 2001
From: Gabriel Sanches <gabriel@gsr.dev>
Date: Thu, 7 May 2020 21:04:47 -0300
Subject: [PATCH 5/5] fzf: install fzf.vim to Neovim plugin directory

For Vim users, FZF works out of the box, but Neovim users have to
manually copy /usr/share/vim/vimfiles/plugin/fzf.vim to the proper
Neovim equivalent.
---
 srcpkgs/fzf/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/fzf/template b/srcpkgs/fzf/template
index 109f5d44028..d67a722709b 100644
--- a/srcpkgs/fzf/template
+++ b/srcpkgs/fzf/template
@@ -1,7 +1,7 @@
 # Template file for 'fzf'
 pkgname=fzf
 version=0.22.0
-revision=1
+revision=2
 build_style=go
 go_import_path=github.com/junegunn/fzf
 hostmakedepends="git"
@@ -22,6 +22,7 @@ post_install() {
 
 	sed -i -e 's#source ~/\.fzf\.bash; ##' shell/key-bindings.bash
 	vinstall plugin/fzf.vim 644 usr/share/vim/vimfiles/plugin
+	vinstall plugin/fzf.vim 644 usr/share/nvim/runtime/plugin
 	vinstall shell/completion.bash 644 usr/share/bash-completion/completions fzf
 	vinstall shell/completion.zsh 644 usr/share/doc/fzf
 	vinstall shell/key-bindings.zsh 644 usr/share/doc/fzf

  parent reply	other threads:[~2020-09-21 15:08 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  0:41 [PR PATCH] " gbrlsnchs
2020-05-08  3:50 ` Anachron
2020-05-08 11:18 ` daniel-eys
2020-05-08 11:53 ` gbrlsnchs
2020-05-08 11:54 ` gbrlsnchs
2020-05-10  4:54 ` gbrlsnchs
2020-08-11  2:11 ` [PR PATCH] [Updated] " gbrlsnchs
2020-08-11  2:26 ` gbrlsnchs
2020-09-21 15:00 ` [PR PATCH] [Closed]: " gbrlsnchs
2020-09-21 15:08 ` gbrlsnchs [this message]
2020-09-21 15:43 ` ericonr
2020-09-21 15:50 ` ericonr
2020-09-21 15:51 ` ericonr
2020-09-21 15:59 ` gbrlsnchs
2020-09-21 15:59 ` gbrlsnchs
2020-09-21 16:42 ` [PR PATCH] [Updated] " gbrlsnchs
2020-09-21 16:53 ` [PR REVIEW] " ericonr
2020-09-21 16:53 ` ericonr
2020-09-21 17:27 ` [PR PATCH] [Updated] " gbrlsnchs
2020-09-21 17:30 ` [PR REVIEW] " gbrlsnchs
2020-09-21 17:31 ` gbrlsnchs
2020-09-21 17:36 ` gbrlsnchs
2020-09-21 17:36 ` gbrlsnchs
2020-09-21 18:18 ` ericonr
2020-09-21 18:59 ` gbrlsnchs
2020-09-21 19:15 ` ericonr
2020-09-21 19:24 ` [PR PATCH] [Updated] " gbrlsnchs
2020-09-21 20:02 ` gbrlsnchs
2020-09-23 16:46 ` sgn
2020-09-23 16:48 ` sgn
2020-09-23 16:48 ` sgn
2020-09-23 16:53 ` ericonr
2020-09-23 16:59 ` sgn
2020-09-23 17:12 ` ahesford
2020-09-23 17:17 ` ericonr
2020-09-23 17:20 ` gbrlsnchs
2020-09-23 17:28 ` sgn
2020-09-23 17:30 ` sgn
2020-09-23 17:34 ` gbrlsnchs
2020-09-23 17:38 ` sgn
2020-09-23 17:57 ` ericonr
2020-09-23 17:59 ` [PR PATCH] [Merged]: " ericonr
2020-09-23 20:12 ` maybe-one-day-ubermensch
2020-09-23 21:38 ` gbrlsnchs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200921150825.lRGFwiiYItW6IzYRU54B49ykHn6Vt5CbRQxHiUhww7Q@z \
    --to=gbrlsnchs@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).