Closed applejag closed 3 years ago
Found the command nix-store
and the parameter --gc
which seemed appropriate.
I uninstalled neuron, ran the garbage collection, and then tried the command again. The nix-env -if
command took a while to complete (8m 21s) as it has to download and compile everything from scratch (and I've a below average internet connection), but it worked!
nix-env -e neuron
nix-store --gc
nix-env -if https://github.com/srid/neuron/archive/master.tar.gz
Closing this as resolved as I found a workaround.
Heh, now I wanted to downgrade again because I found that my editor didn't support neuron v2 even slightly. But without success.
I've done multiple GC runs and tried reinstalling both neuron v1 and neuron from master, as well as running the nix installation script multiple times just to see if that changed anything.
I'm stuck at not being able to install neuron v1, which was installed and working before..
$ nix-store --gc
finding garbage collector roots...
deleting garbage...
deleting '/nix/store/amcgza7nfnbckns1429gx1vgqwrp3vs6-source'
deleting '/nix/store/2pa0h9wqw1y6yzz7xczivbr35fyxi8q5-v1.tar.gz'
deleting '/nix/store/10x2w31y0p7a5m5r34g9vxqz1d9rh37g-v1.tar.gz'
deleting '/nix/store/trash'
deleting unused links...
note: currently hard linking saves -0.00 MiB
3 store paths deleted, 13.22 MiB freed
$ nix-env -if https://github.com/srid/neuron/archive/v1.tar.gz --show-trace
unpacking 'https://github.com/NixOS/nixpkgs/archive/3537ea7a8358abe11d07223812305faebf3d5074.tar.gz'...
gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
error: while evaluating anonymous function at /nix/store/10x2w31y0p7a5m5r34g9vxqz1d9rh37g-v1.tar.gz/default.nix:1:1, called from undefined position:
while evaluating the attribute 'neuron' at /nix/store/10x2w31y0p7a5m5r34g9vxqz1d9rh37g-v1.tar.gz/project.nix:104:3:
while evaluating the file '/nix/store/10x2w31y0p7a5m5r34g9vxqz1d9rh37g-v1.tar.gz/dep/nixpkgs/default.nix':
while evaluating the file '/nix/store/10x2w31y0p7a5m5r34g9vxqz1d9rh37g-v1.tar.gz/dep/nixpkgs/thunk.nix':
while evaluating 'fetch' at /nix/store/10x2w31y0p7a5m5r34g9vxqz1d9rh37g-v1.tar.gz/dep/nixpkgs/thunk.nix:2:13, called from /nix/store/10x2w31y0p7a5m5r34g9vxqz1d9rh37g-v1.tar.gz/dep/nixpkgs/thunk.nix:9:4:
program 'tar' failed with exit code 2
Is there some other kind of cache I'm missing that I could be clearing?
Edit: Btw that nix-env -if
command takes on average 6m 40s until it fails. It has been quite tedious to test different solutions I can come up with. It took it like 8m before when it succeeded and it doesn't log any errors until it completely fails, so I cannot just CTRL-C quickly and try something else.
Rebooted my WSL instance with wsl.exe -t Ubuntu
, relaunched my terminal, ran the nix-env -if
command again, and then it worked.
I do "love" these back-n-forth issues. So "happy" I could be the author of one... Lol.
Moral of the issue: When in doubt, restart the machine. (as always)
Cloning the git repo locally and running nix-env -if .
is another way to install it.
I found that my editor didn't support neuron v2 even slightly.
@jilleJr If you are using vim or emacs, here's some info on making them work with v2 (shouldn't be too much effort, as I pushed the new query CLI today).
When you migrate to v2, checkout the dirtree
plugin -- it helps organize your notes in directories, as well as obviates many uses of tag queries (simplify the workflow overall in the process).
Hey thanks! Yea I'm using the emacs neuron-mode plugin.
Good note on the dirtree tip. My zettelkasten is up to just 49 zettels atm but it's already getting so annoying to navigate the file structure manually.
I'm new to nix. Not sure how to debug this.
I previously had neuron-1.1.12.0 installed, then tried to upgrade by following the https://neuron.zettel.page/install.html guide.
Is this a problem with nix or neuron?
Kind regards,
Edit: Here's some environment info:
nix-env --version
: 2.3.10