mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +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
|
# 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
|
# library anyways. This set is mostly copied over from nixpkgs' way of doing
|
||||||
# things.
|
# things.
|
||||||
{ pkgs }:
|
#
|
||||||
|
|
||||||
# Take note the `lib` attribute throughout all of the library files are
|
# 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
|
# referring to the Bahaghari library set. We mostly rely on `pkgs.lib` as an
|
||||||
# easy way to identify if we use nixpkgs' standard library.
|
# easy way to identify if we use nixpkgs' standard library.
|
||||||
|
{ pkgs }:
|
||||||
|
|
||||||
pkgs.lib.makeExtensible
|
pkgs.lib.makeExtensible
|
||||||
(self:
|
(self:
|
||||||
let
|
let
|
||||||
@ -14,6 +15,9 @@ pkgs.lib.makeExtensible
|
|||||||
{
|
{
|
||||||
trivial = callLibs ./trivial.nix;
|
trivial = callLibs ./trivial.nix;
|
||||||
hex = callLibs ./hex.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;
|
tinted-theming = callLibs ./tinted-theming.nix;
|
||||||
|
|
||||||
inherit (self.trivial) importYAML toYAML toBaseDigitsWithGlyphs;
|
inherit (self.trivial) importYAML toYAML toBaseDigitsWithGlyphs;
|
||||||
|
@ -6,6 +6,12 @@
|
|||||||
rec {
|
rec {
|
||||||
inherit (pkgs.lib.trivial) toHexString;
|
inherit (pkgs.lib.trivial) toHexString;
|
||||||
|
|
||||||
# A variant of `lib.lists.range` function just with hexadecimal digits.
|
/* A variant of `lib.lists.range` function just with hexadecimal digits.
|
||||||
range = first: last: builtins.map (n: toHexString n) (lib.lists.range first last);
|
|
||||||
|
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