diff options
author | Maëlys Bras de fer <mae.bdf@outlook.com> | 2024-05-22 20:01:05 +0200 |
---|---|---|
committer | Maëlys Bras de fer <mae.bdf@outlook.com> | 2024-05-22 20:01:05 +0200 |
commit | 95674de399b4c880f16059f8e2ce84e7388842d8 (patch) | |
tree | 36a6d762b405ffe35ced9cd18836cb391b688142 /nixos/modules/programs/wayland/lib.nix | |
parent | bcbeccfa7d3fff2203ddfd4a2e4b8ba0f1f38584 (diff) |
nixos/{river,hyprland}: override package using apply
Diffstat (limited to 'nixos/modules/programs/wayland/lib.nix')
-rw-r--r-- | nixos/modules/programs/wayland/lib.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/programs/wayland/lib.nix b/nixos/modules/programs/wayland/lib.nix new file mode 100644 index 0000000000000..0f275d3f18c56 --- /dev/null +++ b/nixos/modules/programs/wayland/lib.nix @@ -0,0 +1,12 @@ +{ lib }: + +{ + genFinalPackage = pkg: args: + let + expectedArgs = with lib; + lib.naturalSort (lib.attrNames args); + existingArgs = with lib; + naturalSort (intersectLists expectedArgs (attrNames (functionArgs pkg.override))); + in + if existingArgs != expectedArgs then pkg else pkg.override args; +} |