Skip to content

Commit

Permalink
fix(ci): integer overflow
Browse files Browse the repository at this point in the history
For some reason, integer overflows in CI trigger an error, but not when
I evaluate locally...
  • Loading branch information
gekoke committed Dec 12, 2024
1 parent c9ff12e commit 5b3c7f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/math/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ _: rec {
assert exponent >= 0;
if exponent == 0 then 1 else base * pow base (exponent - 1);

I64_MAX = (pow 2 63) - 1;
# Avoid overflow triggering an evaluation error
I64_MAX = (pow 2 62) - 1 + (pow 2 62);
}
1 change: 1 addition & 0 deletions modules/nixos/user/shell/zsh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
with lib;
with lib.elementary;
let
inherit (lib.elementary) I64_MAX;
cfg = config.elementary.user.shell.zsh;
in
{
Expand Down

0 comments on commit 5b3c7f8

Please sign in to comment.