emacs-twist / twist.nix

Build an entire Emacs configuration as a Nix package in a pure, reproducible way
GNU General Public License v3.0
66 stars 6 forks source link

What is the procedure to updating the lock? #86

Closed terlar closed 1 year ago

terlar commented 1 year ago

I am still not sure what the procedure is to update the lock.

We do have nix run .#lock --impure and nix run .#update --impure. But neither seems to update packages unless you remove the current lock information first. It just updates packages that are modified, but don't update to later versions for the ones that exist.

E.g. this works:

rm lock/*
nix run .#lock --impure

Is this the procedure or should these other helper commands work in some way?

akirak commented 1 year ago

nix run .#lock --impure adds missing flake.lock entries, and nix run .#update --impure updates archive.lock entries. To update existing entries in flake.lock, you can simply run nix flake update in the directory of the lock file.

akirak commented 1 year ago

On a side note, this project does not encourage updating all lock entries, because that's not the goal of this project in the first place. The existing nixpkgs infrastructure for elisp packages should suffice for a globally managed and globally updated package set.

terlar commented 1 year ago

Okay nice, that explains it. I wasn't sure if I was supposed to run normal flake update procedures for the lock, then I know it is fine. Then I can use the individual update commands for inputs etc.

Thank you, I'm not sure how I want to do things, but I like that I am in full control of the inputs. What pushed me over the edge was the last time ELPA updates was broken in the nixpkgs infrastructure and I wanted some recent changes to one of the packages.

Also I like that builtins are properly handled and I don't need to figure out how to hack things to avoid packages being pulled in that is actually part of Emacs now.

akirak commented 1 year ago

My plan for providing a better updating experience is to provide an Emacs client to manage flakes. nix3.el is the work to achieve the usability goal.

At present, it lets you browse a flake using nix3-flake-show command and update a particular input. It should maintain mappings between remote repositories and local repositories, but I haven't worked on the functionality yet. Maybe I I'll work on it after some more important projects.