• 2 Posts
  • 25 Comments
Joined 1 year ago
cake
Cake day: June 27th, 2023

help-circle







  • Maybe I’m missing something, but shouldn’t the benchmark be a good approximation to the real workload? I don’t see how the measurements reflect the performance difference in real life usages.

    Why would I need 100MiB/s processing as opposed to 20MiB/s processing, when I can only read maybe several lines per second?







  • If you execute a binary without specifying the path to it, it will be searched from the $PATH environment variable, which is a list of places to look for the binary. From left to right, the first found one is returned.

    You can use which cat to see what it resolves to and whereis cat to get all possible results.

    If you intentionally wants to use a different binary with the same name, you can either directly use its path, or prepend its path to $PATH.






  • As other comments point out, they are usually not properly packaged through nix.

    If you read the vim/plugins modules, for most plugins, the derivation just downloads the plugin, puts it to nix-store, and makes it available to the editor through environment variables. So it’s similar to the binary distributed software. Two most notable restrictions:

    1. Nix is not aware of transient dependencies.
    2. The plugin is not aware of the nix-store model.

    So for plugins that don’t have external dependencies (or dependencies other than the “common” ones like python or sh that happen to be available), and that don’t interact with the filesystems, this approach would be fine, but the more complex ones would fail.

    In your example, mason failed because of 1, home-manager wasn’t aware that the pip module is a transient dependency of this plugin; and treesitter failed because of 2, because it doesn’t know that nix-store is read-only and should be managed by nix.

    There are no general solutions, but people may have nixified some plugins on a case-by-case basis. If you don’t want to spend a lot of time (and remember that it might be broken by the next plugin upgrade), as others have suggested, take the traditional plugin management approach. (Personally, I use LunarVim which uses Lazy.nvim and it’s been working fine.)