[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Packaging baby-steps
From: |
Cássio Tavares |
Subject: |
Packaging baby-steps |
Date: |
Wed, 27 Apr 2022 20:05:00 +0000 |
Hello!
I'm new to Guix, and I chose to use it for the principles of it
(linux-libre and such), but against a better judgement of my technical
incompetence. So.
A lot of things I was used to in more mainstream distros are not packaged
here and, after reading the manual and learning about how I could write my
own packages, and with `guix import` for short-cut, I decided to give it a
try. Then another. Then another — in all of them I failed miserably, and
couldn't make any sense of the log files…
I let it go for a while, but then I thought that some packages should be
easier to write than the ones I tried. So, I started looking around for
what I could do, and I realised: there are no plugin managers for neovim.
Then I went to GitHub, and looked at `*packer.nvim*
<https://github.com/wbthomason/packer.nvim>`, and… …is it feasible? — this
is how `*packer.nvim*` is supposed to be installed on regular, imperative
distros:
*Step One:* issue this command:
*git clone --depth 1 https://github.com/wbthomason/packer.nvim\
<https://github.com/wbthomason/packer.nvim\>
~/.local/share/nvim/site/pack/packer/start/packer.nvim*
*Step Two:* write a `*/path/to/neovim/plugins/lua/plugins.lua*` that
contains:
*-- Only required if you have packer configured as `opt`*
*vim.cmd [[packadd packer.nvim]]return
require('packer').startup(function() -- Packer can manage itself use
'wbthomason/packer.nvim'*
* -- Configure other plugins*
*…*
*end)*
*Step three:* include this line — `*lua require('plugins')*` — in the file
`*init.vim*`, wherever it is.
*My questions:*
1. *Step one* seems to be just a simple file download to an appropriate
directory — is that assessment correct?
2. If so, would it be hard to generalize this so that it can be
installed either system-wide or per-user? I guess there is a Guix idiomatic
way to accomplish what the above git command is doing, right?
3. *Step two*, I imagine, should be easy if there isn't already a `
*plugin.lua*` file, right? What if there is?
4. Is it acceptable if the installation process doesn't look into the
plugins directory-tree to try and automatically create entries for them in
`*plugin.lua*`?
5. Also, in *Step two*, the first line in `*plugin.lua*` is required
only if a certain condition is met. Is it OK to leave it there if the
condition is not met?
6. The problems in *Step three* seem to be the same as in *Step two*.
Except that maybe it could be assumed that, since `*neovim*` is a
dependency, the file `*init.vim*` would necessarily exist?
7. From what I could tell from `*packer.nvim*`'s repo, the only
dependency is on neovim version 0.5 or later — is there anything else I
would need to work on or check out?
I will be grateful to anyone who helps me to write my first package...
Regards,
Cássio
-----
Faculdade de Letras - UFG
*“*
*Ou a gente se Raôni, ou a gente se Sting**”*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Packaging baby-steps,
Cássio Tavares <=