mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-31 10:58:24 +00:00
Gabriel Arazas
28dfaefc20
Now, there could be multiple wrappers within the configuration but it should still result with one derivation unlike the original version. This could be handy for making package overrides with multiple binaries (for example, 7Z) while making the interface consistent. This turns out to be way nicer than I thought which is a good thing.
20 lines
340 B
Nix
20 lines
340 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.wrapper-manager;
|
|
in
|
|
{
|
|
imports = [
|
|
../common.nix
|
|
];
|
|
|
|
config = lib.mkMerge [
|
|
{ wrapper-manager.extraSpecialArgs.hmConfig = config; }
|
|
|
|
(lib.mkIf (cfg.packages != {}) {
|
|
home.packages =
|
|
lib.mapAttrsToList (_: wrapper: wrapper.build.toplevel) cfg.packages;
|
|
})
|
|
] ;
|
|
}
|