lib: remove top-level with lib

This commit is contained in:
Thiago Kenji Okada 2021-10-27 08:58:56 -03:00 committed by Robert Helgesson
parent 71902bc913
commit 3ccddfc48d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
10 changed files with 23 additions and 24 deletions

View file

@ -9,9 +9,8 @@
{ lib }:
with lib;
rec {
let inherit (lib) all any filterAttrs mapAttrs mapAttrsToList toposort;
in rec {
emptyDag = { };

View file

@ -1,7 +1,8 @@
{ homeDirectory, lib, pkgs }:
with lib;
let
inherit (lib) hasPrefix hm literalExpression mkDefault mkIf mkOption removePrefix types;
in
{
# Constructs a type suitable for a `home.file` like option. The
# target path may be either absolute or relative, in which case it

View file

@ -5,9 +5,9 @@
{ lib }:
with lib;
let
inherit (lib)
concatMapStringsSep concatStrings escape hasPrefix head replaceStrings;
mkPrimitive = t: v: {
_type = "gvariant";

View file

@ -1,8 +1,9 @@
{ lib }:
with lib;
{
let
inherit (lib)
genList length lowerChars replaceStrings stringToCharacters upperChars;
in {
# Figures out a valid Nix store name for the given path.
storeFileName = path:
let

View file

@ -1,8 +1,10 @@
{ dag, lib }:
with lib;
let
inherit (lib)
concatStringsSep defaultFunctor fixedWidthNumber imap1 isAttrs isList length
listToAttrs mapAttrs mkIf mkOption mkOptionType nameValuePair stringLength
types warn;
isDagEntry = e: isAttrs e && (e ? data) && (e ? after) && (e ? before);

View file

@ -1,9 +1,11 @@
{ lib, dag ? import ./dag.nix { inherit lib; }
, gvariant ? import ./gvariant.nix { inherit lib; } }:
with lib;
let
inherit (lib)
all concatMap foldl' getFiles getValues head isFunction literalExpression
mergeAttrs mergeDefaultOption mergeOneOption mergeOptions mkOption
mkOptionType showFiles showOption types;
typesDag = import ./types-dag.nix { inherit dag lib; };

View file

@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (lib) concatStringsSep hm mkMerge mkOption types;
dag = lib.hm.dag;

View file

@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (lib) concatStringsSep hm mkOption types;
dag = lib.hm.dag;

View file

@ -1,9 +1,6 @@
{ config, lib, pkgs, ... }:
with lib;
let
let inherit (lib) concatStringsSep hm mapAttrsToList mkMerge mkOption types;
in {
options.examples = mkOption { type = types.attrsOf hm.types.gvariant; };

View file

@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (lib) concatStringsSep hm mkMerge mkOption types;
dag = lib.hm.dag;