diff options
author | Silvan Mosberger <contact@infinisil.com> | 2024-02-09 05:31:01 +0100 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2024-02-09 05:45:31 +0100 |
commit | 27488b861c50f9354bf07e7228164f30c2e6d660 (patch) | |
tree | 976e446dee1c869ee95924053543a642f3e3ec91 /lib/trivial.nix | |
parent | 442d407992384ed9c0e6d352de75b69079904e4e (diff) |
lib.trivial: Remove unneeded polyfills
Nix 2.3 (the minimum version needed to evaluate Nixpkgs) supports these, so no need to keep them around.
Diffstat (limited to 'lib/trivial.nix')
-rw-r--r-- | lib/trivial.nix | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/trivial.nix b/lib/trivial.nix index 58620006de151..fa499cbbf0285 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -95,21 +95,6 @@ in { /* boolean “and” */ and = x: y: x && y; - /* bitwise “and” */ - bitAnd = builtins.bitAnd - or (import ./zip-int-bits.nix - (a: b: if a==1 && b==1 then 1 else 0)); - - /* bitwise “or” */ - bitOr = builtins.bitOr - or (import ./zip-int-bits.nix - (a: b: if a==1 || b==1 then 1 else 0)); - - /* bitwise “xor” */ - bitXor = builtins.bitXor - or (import ./zip-int-bits.nix - (a: b: if a!=b then 1 else 0)); - /* bitwise “not” */ bitNot = builtins.sub (-1); @@ -165,8 +150,8 @@ in { inherit (builtins) pathExists readFile isBool isInt isFloat add sub lessThan - seq deepSeq genericClosure; - + seq deepSeq genericClosure + bitAnd bitOr bitXor; ## nixpkgs version strings |