summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2024-09-01 12:06:30 +0200
committerzimbatm <zimbatm@zimbatm.com>2024-09-01 12:13:15 +0200
commit1ea32d4f698230e2c1e765d857c44b17daa377b4 (patch)
treea8b76caf278b784f8abdf6e2f4289fa9528f053a /pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch
parentdd6c0ee128ae96cbb32855741ec85576a1368c1c (diff)
nixos/grub: fix value precendence with optional -> mkIf
When using `lib.optionals`, the return value of both branches of the condition get set as a value to the option. When using `lib.mkIf`, only the positive condition gets set as a value to the option. This small distinction is important when dealing with precedence. For example here, we wanted to set a boot.grub.devices default value with lib.mkDefault, and that was getting overridden with the empty value of `lib.optional (cfg.device != "") cfg.device`. See https://github.com/nix-community/srvos/pull/491#discussion_r1738827651 The general conclusion is that using `lib.mkIf` is preferable to `lib.optional` or `lib.optionals` when setting values in the NixOS module system.
Diffstat (limited to 'pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch')
0 files changed, 0 insertions, 0 deletions