Add nix-bitcoin.lib for utility functions and types
This commit is contained in:
@@ -14,4 +14,6 @@
|
||||
lightning-loop = pkgs.callPackage ./lightning-loop { };
|
||||
|
||||
pinned = import ./pinned.nix;
|
||||
|
||||
lib = import ./lib.nix { inherit (pkgs) lib; };
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{ lib }:
|
||||
{
|
||||
# An address type that checks that there's no port
|
||||
ipv4Address = lib.types.addCheck lib.types.str (s: builtins.length (builtins.split ":" s) == 1);
|
||||
}
|
||||
Reference in New Issue
Block a user