mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
lib: remove unused let bindings and args@{} uses
This commit is contained in:
@@ -123,7 +123,6 @@ let
|
||||
pathExists
|
||||
seq
|
||||
typeOf
|
||||
nixVersion
|
||||
;
|
||||
|
||||
inherit (lib.lists)
|
||||
@@ -138,7 +137,6 @@ let
|
||||
|
||||
inherit (lib.strings)
|
||||
isStringLike
|
||||
versionOlder
|
||||
;
|
||||
|
||||
inherit (lib.filesystem)
|
||||
|
||||
@@ -371,7 +371,6 @@ in
|
||||
let
|
||||
inherit (lib)
|
||||
concatMapAttrs
|
||||
id
|
||||
makeScope
|
||||
recurseIntoAttrs
|
||||
removeSuffix
|
||||
|
||||
@@ -19,7 +19,6 @@ let
|
||||
isString
|
||||
match
|
||||
typeOf
|
||||
elemAt
|
||||
;
|
||||
|
||||
in
|
||||
|
||||
@@ -23,7 +23,6 @@ let
|
||||
*/
|
||||
ipv6Bits = 128;
|
||||
ipv6Pieces = 8; # 'x:x:x:x:x:x:x:x'
|
||||
ipv6PieceBits = 16; # One piece in range from 0 to 0xffff.
|
||||
ipv6PieceMaxValue = 65535; # 2^16 - 1
|
||||
in
|
||||
let
|
||||
|
||||
@@ -468,7 +468,7 @@ rec {
|
||||
: 3\. Function argument
|
||||
*/
|
||||
mergeUniqueOption =
|
||||
args@{
|
||||
{
|
||||
message,
|
||||
# WARNING: the default merge function assumes that the definition is a valid (option) value. You MUST pass a merge function if the return value needs to be
|
||||
# - type checked beyond what .check does (which should be very little; only on the value head; not attribute values, etc)
|
||||
|
||||
@@ -51,7 +51,6 @@ let
|
||||
filter
|
||||
filterAttrs
|
||||
fix
|
||||
fold
|
||||
foldAttrs
|
||||
foldl
|
||||
foldl'
|
||||
@@ -4794,7 +4793,7 @@ runTests {
|
||||
# for sub-directories
|
||||
testPackagesFromDirectoryNestedScopes =
|
||||
let
|
||||
inherit (lib) makeScope recurseIntoAttrs;
|
||||
inherit (lib) makeScope;
|
||||
emptyScope = makeScope lib.callPackageWith (_: { });
|
||||
in
|
||||
{
|
||||
|
||||
@@ -3,16 +3,10 @@ let
|
||||
inherit (lib)
|
||||
types
|
||||
mkOption
|
||||
setDefaultModuleLocation
|
||||
evalModules
|
||||
;
|
||||
inherit (types)
|
||||
deferredModule
|
||||
lazyAttrsOf
|
||||
submodule
|
||||
str
|
||||
raw
|
||||
enum
|
||||
;
|
||||
in
|
||||
{
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) types mkOption setDefaultModuleLocation;
|
||||
inherit (lib) types mkOption;
|
||||
inherit (types)
|
||||
deferredModule
|
||||
lazyAttrsOf
|
||||
submodule
|
||||
str
|
||||
raw
|
||||
enum
|
||||
;
|
||||
in
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
|
||||
moduleWithKey =
|
||||
{ config, ... }:
|
||||
{
|
||||
config = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./declare-enable.nix
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkOption types;
|
||||
forceDeep = x: builtins.deepSeq x x;
|
||||
mergedSubOption = (options.merged.type.getSubOptions options.merged.loc).extensible;
|
||||
in
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user