Skip to content

packages now overrideable via actual override function

Compare
Choose a tag to compare
@BirdeeHub BirdeeHub released this 07 Aug 08:23
· 358 commits to main since this release

You may now call yourpackage.override to override
the values submitted to the builder function. You may do so as many times as you like.

values available to override: (prev will contain these from the previous
call)

luaPath categoryDefinitions packageDefinitions name
nixpkgs system extra_pkg_config dependencyOverlays nixCats_passthru

While you could get the values from the flake before and combine them with new definitions into a new package, this is yet another, possibly cleaner way to do it. (see the template REREREconfigure for info on that)

Useage of override for nixCats is possibly not quite sufficiently documented yet, however it is demonstrated in nix flake init -t github:BirdeeHub/nixCats-nvim#overriding

In addition, modules have been added to package passthrough with defaultPackageName equaling the name of the package it is within.

Now, if you have an existing nixCats package, you are fully guaranteed to be able to reconfigure it, regardless of if they supplied the full set of flake outputs.

More info on overriding at

https://ryantm.github.io/nixpkgs/using/overrides/#sec-pkg-override

https://nixos.org/guides/nix-pills/17-nixpkgs-overriding-packages

In addition I fixed collision errors that occurred when you name the package nvim, and the collision errors that occur when you try to install nixCats packages with different version of nvim to the same user's path via home.packages or environment.systemPackages

I am very happy about that last thing in particular. You can now actually make packages named nvim