I am new to nix and I am not yet familiar with all the conventions and best practices.
I have wondered why you are exposing the api to declare packages needed for a typst compilation using the unstable_typstPackages attribute. In my mind, letting the user provide the packages by referencing nixpkgs.typstPackages.… directly, would yield less boilerplate and be easier to implement for you.
For refercence, the nixpkgs.typstPackages are populated in this file: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ty/typst/typst-packages.nix#L39
Mostly, I'm just curious on the advantages of downloading the packages manually.
I am new to nix and I am not yet familiar with all the conventions and best practices.
I have wondered why you are exposing the api to declare packages needed for a typst compilation using the
unstable_typstPackagesattribute. In my mind, letting the user provide the packages by referencingnixpkgs.typstPackages.…directly, would yield less boilerplate and be easier to implement for you.For refercence, the
nixpkgs.typstPackagesare populated in this file: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ty/typst/typst-packages.nix#L39Mostly, I'm just curious on the advantages of downloading the packages manually.