mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
bahaghari/lib: update comments
This commit is contained in:
parent
0af7a31d7b
commit
6000026719
@ -1,11 +1,12 @@
|
||||
# Bahaghari's set of library. This requires nixpkgs' package set which has its
|
||||
# library anyways. This set is mostly copied over from nixpkgs' way of doing
|
||||
# things.
|
||||
{ pkgs }:
|
||||
|
||||
#
|
||||
# Take note the `lib` attribute throughout all of the library files are
|
||||
# referring to the Bahaghari library set. We mostly rely on `pkgs.lib` as an
|
||||
# easy way to identify if we use nixpkgs' standard library.
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.lib.makeExtensible
|
||||
(self:
|
||||
let
|
||||
@ -14,6 +15,9 @@ pkgs.lib.makeExtensible
|
||||
{
|
||||
trivial = callLibs ./trivial.nix;
|
||||
hex = callLibs ./hex.nix;
|
||||
|
||||
# Dedicated module sets are not supposed to have any of its functions as
|
||||
# a top-level attribute.
|
||||
tinted-theming = callLibs ./tinted-theming.nix;
|
||||
|
||||
inherit (self.trivial) importYAML toYAML toBaseDigitsWithGlyphs;
|
||||
|
@ -6,6 +6,12 @@
|
||||
rec {
|
||||
inherit (pkgs.lib.trivial) toHexString;
|
||||
|
||||
# A variant of `lib.lists.range` function just with hexadecimal digits.
|
||||
range = first: last: builtins.map (n: toHexString n) (lib.lists.range first last);
|
||||
/* A variant of `lib.lists.range` function just with hexadecimal digits.
|
||||
|
||||
Type: range :: Int -> Int -> [ String ]
|
||||
|
||||
Example:
|
||||
range 15 18 => [ "F" "10" "11" ]
|
||||
*/
|
||||
range = first: last: builtins.map (n: toHexString n) (pkgs.lib.lists.range first last);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user