Comments (7)
I am affected by the same issue trying to use hotpot with nix. The nix-compat
branch works for me.
from hotpot.nvim.
Hotpot ships with a bootstrapper that will compile hotpot itself, it basically traverses hotpot/fnl/*
and writes it to hotpot/lua/*
(except for hotpot.fnl
which is the pre-compiled bootstrapper). Looks like that is having trouble with permissions? I wonder if homemanager sets up some restrictive permissions somewhere?
Cannot create directory /nix/store/silam09pv3pvvvx4zrpkjvccllfxggpn-vim-pack-dir/pack/home-manager/start/vimplugin-hotpot.nvim/lua/hotpot/api: permission denied
The SHA that works is basically just before 0.2.0
which included the re-written bootstrapper.
Per your last nix issue, I wonder if you can run a post-install command to enforce hotpot/lua
as writable, before you run nvim the first time and the code gets compiled?
Relevant code, patches welcome, perhaps it's naive to assume it inherits a good umask.
The other option is to patch the build.sh to compile everything over barring I think only macros.fnl
. The code for that is sort of here in 0.1.0 but it needs modifications to not dump the bootstrapper which also acts as the "package.path installer", which you could then call in the post-install, not sure if that would be more "nixy".
from hotpot.nvim.
So I found here is where that error is being thrown. This is where Nix and home-manager "wrap" neovim and build its configuration. But for the life of me, I can't figure out why this "remote plugin manifest generation" script is being included in the first place :P
Anyway--
The SHA that works is basically just before 0.2.0 which included the re-written bootstrapper.
My guess is that the bootstrapper from before didn't run during/before this :UpdateRemotePlugins
invocation of nvim
(and it is now)? It seems to me that this isn't a matter of how the bootstrapper runs but rather when (or why)
from hotpot.nvim.
Yeah previously hotpot would compile itself to ~/.cache/nvim/home/<you>/<your-nvim-plugins-dir>/hotpot/
but now it compiles directly into ~/<your-nvim-plugins-dir>/hotpot/lua/
, but nix sets that folder to be read only I guess.
Can you do something like this?
home.activation = {
unlockHotpotLua = home-manager.lib.hm.dag.entryAfter ["writeBoundary"] ''
HOTPOT_DIR="${config.xdg.localHome}/share/nvim/site/pack/hotpot/lua" # no idea where the real dir is
if [[ -d "$HOTPOT_DIR" ]]; then
$DRY_RUN_CMD chmod 744 "$HOTPOT_DIR"
fi
'';
};
from hotpot.nvim.
Is there any way to revert to the previous behavior? Nix stores hotpot (and every other package) in a read-only store, not unlike most system-level package managers that store files as root-owned.
If it's possible to configure the folder the bootstrapping takes place in (or having it go back by $XDG_CACHE_HOME
) we can fix this without breaking the permission model.
EDIT: ended up switching to Tangerine which makes this rather easy:
require("tangerine").setup({
target = vim.fn.stdpath("cache") .. "/tangerine",
compiler = {
hooks = {
"oninit"
},
},
})
probably better to redirect home-manager users there in case this would be annoying to implement in hotpot, I'm assuming there was a reason to move away from XDG_CACHE_HOME...
from hotpot.nvim.
We compile to lua/
to avoid having the extra search target in package.path
(and we don't ship a full lua/
package for my own QOL).
I have added a branch, https://github.com/rktjmp/hotpot.nvim/tree/nix-compat which will check for a global __hotpot_bootstrap_target_dir
which should be set before hotpot is required. It should be a full path to somewhere you can write to, probably you would want:
-- __hotpot_bootstrap_target_dir = vim.fn.stdpath("cache") .. "/some/path"
-- require("hotpot")
If someone wants to test the branch that would be useful. Hotpot has always (will always?) had the "just require("hotpot")
" minimal setup, so we can't really pass options to the bootstrapper without globals 🤮.
Edit: Configuration no longer required. @harrisonthorne, can you try the nix-compat branch?
I'm curious how home-manager handles programs that write their own config files or update local data, do you just not put those applications under it or what?
from hotpot.nvim.
Thanks for testing, merged.
from hotpot.nvim.
Related Issues (20)
- `vim.loader` support HOT 1
- Diagnostics includes path before message
- Problems installing... hotpot.searcher.module not found when using lazy.nvim HOT 2
- Bump to fennel 1.3.1
- Problems for using api.make to build ~/.config/nvim/init.fnl HOT 5
- Broken on Windows because `vim.fs.normalize` converts all path separators to forward slash (`\` -> `/`) HOT 4
- lazy.nvim conflicts with fnl ftplugins HOT 5
- Diagnostics autocommand cant be deleted when a buffer is renamed
- Improve clearing Fennels `macro-loaded` table when needed. HOT 2
- Windows RUNNER~1 paths HOT 2
- Automatically load `plugin/*.fnl` files HOT 1
- attempt to call local 'glob_search' (a nil value) HOT 3
- "The hotpot.api.make usage has changed" on v0.9.7 HOT 4
- How to reduce startup time besides using `vim.loader.enable()`? HOT 2
- Diagnosing slow api.make.build() performance HOT 3
- `(include mod)` depends on CWD / fennel.path value HOT 1
- Add region to reflect
- Consider using a hash instead of modification time HOT 5
- Using `folke/lazy.nvim` with module-name/string plugin definitions HOT 27
- `include` path behavior should match `require` behavior HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hotpot.nvim.