m15a / flake-awesome-neovim-plugins

Nix flake of Awesome Neovim plugins
BSD 3-Clause "New" or "Revised" License
47 stars 11 forks source link

Packages that have native dependency #127

Closed m15a closed 4 months ago

m15a commented 4 months ago

Some plugins have native dependencies. For example, sniprun depends on its Rust binary, and thus we should auto-update the cargoHash.

This can be achieved using nix-prefetch:

$ nix-prefetch '{ sha256 }: (import ./default.nix).packages.x86_64-linux.sniprun.bin.cargoDeps.overrideAttrs (_: { cargoSha256 = sha256; })'
The fetcher will be called as follows:
> <unnamed> {
>   sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
> }

sha256-r0Uq8G84PAwxR9zCm3ox+82igGVphW7q8wLzYQrNdTk=
m15a commented 4 months ago

Fixed a bug in aee4232a0d0d06991d7eee183092669a83d09f91

m15a commented 4 months ago

Also I noticed that nix-prefetch requires that any new rev hash is once stored in the JSON file. So, updating should be of two stages:

  1. to update latest commit revs and tarball hashes, and then
  2. to update extra hashes such as cargoSha256.