Add option perSystem.<>.bundlers

Closes #159
This commit is contained in:
Silvio Ankermann 2025-07-31 17:07:11 +02:00 committed by Robert Hensing
parent 67df8c627c
commit 2b8cc3634d
2 changed files with 29 additions and 0 deletions

28
extras/bundlers.nix Normal file
View file

@ -0,0 +1,28 @@
{ lib
, flake-parts-lib
, ...
}:
let
inherit
(lib)
mkOption
types
;
inherit
(flake-parts-lib)
mkTransposedPerSystemModule
;
in
mkTransposedPerSystemModule {
name = "bundlers";
option = mkOption {
type = types.lazyAttrsOf (types.functionTo types.package);
default = { };
description = ''
An attribute set of bundlers to be used by [`nix bundle`](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-bundle.html).
`nix bundle --bundler .#<name>` <derivation> will bundle <derivation> using the bundler `bundlers.<name>`.
'';
};
file = ./bundlers.nix;
}