krebs lib: move {eq,ne,mod} to lib
This commit is contained in:
parent
b4ec1fba50
commit
1a5f52234e
@ -8,11 +8,6 @@ with lib;
|
|||||||
|
|
||||||
let out = lib // rec {
|
let out = lib // rec {
|
||||||
|
|
||||||
eq = x: y: x == y;
|
|
||||||
ne = x: y: x != y;
|
|
||||||
|
|
||||||
mod = x: y: x - y * (x / y);
|
|
||||||
|
|
||||||
guard = spec@{ type, value, ... }:
|
guard = spec@{ type, value, ... }:
|
||||||
assert isOptionType type;
|
assert isOptionType type;
|
||||||
if type.check value
|
if type.check value
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
let
|
let
|
||||||
lib = import <nixpkgs/lib> // builtins // {
|
lib = import <nixpkgs/lib> // builtins // {
|
||||||
shell = import ./shell.nix { inherit lib; };
|
shell = import ./shell.nix { inherit lib; };
|
||||||
|
|
||||||
|
eq = x: y: x == y;
|
||||||
|
ne = x: y: x != y;
|
||||||
|
mod = x: y: x - y * (x / y);
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user