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
|
pathExists
|
||||||
seq
|
seq
|
||||||
typeOf
|
typeOf
|
||||||
nixVersion
|
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit (lib.lists)
|
inherit (lib.lists)
|
||||||
@@ -138,7 +137,6 @@ let
|
|||||||
|
|
||||||
inherit (lib.strings)
|
inherit (lib.strings)
|
||||||
isStringLike
|
isStringLike
|
||||||
versionOlder
|
|
||||||
;
|
;
|
||||||
|
|
||||||
inherit (lib.filesystem)
|
inherit (lib.filesystem)
|
||||||
|
|||||||
@@ -371,7 +371,6 @@ in
|
|||||||
let
|
let
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
concatMapAttrs
|
concatMapAttrs
|
||||||
id
|
|
||||||
makeScope
|
makeScope
|
||||||
recurseIntoAttrs
|
recurseIntoAttrs
|
||||||
removeSuffix
|
removeSuffix
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ let
|
|||||||
isString
|
isString
|
||||||
match
|
match
|
||||||
typeOf
|
typeOf
|
||||||
elemAt
|
|
||||||
;
|
;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ let
|
|||||||
*/
|
*/
|
||||||
ipv6Bits = 128;
|
ipv6Bits = 128;
|
||||||
ipv6Pieces = 8; # 'x:x:x:x:x:x:x:x'
|
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
|
ipv6PieceMaxValue = 65535; # 2^16 - 1
|
||||||
in
|
in
|
||||||
let
|
let
|
||||||
|
|||||||
@@ -468,7 +468,7 @@ rec {
|
|||||||
: 3\. Function argument
|
: 3\. Function argument
|
||||||
*/
|
*/
|
||||||
mergeUniqueOption =
|
mergeUniqueOption =
|
||||||
args@{
|
{
|
||||||
message,
|
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
|
# 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)
|
# - 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
|
filter
|
||||||
filterAttrs
|
filterAttrs
|
||||||
fix
|
fix
|
||||||
fold
|
|
||||||
foldAttrs
|
foldAttrs
|
||||||
foldl
|
foldl
|
||||||
foldl'
|
foldl'
|
||||||
@@ -4794,7 +4793,7 @@ runTests {
|
|||||||
# for sub-directories
|
# for sub-directories
|
||||||
testPackagesFromDirectoryNestedScopes =
|
testPackagesFromDirectoryNestedScopes =
|
||||||
let
|
let
|
||||||
inherit (lib) makeScope recurseIntoAttrs;
|
inherit (lib) makeScope;
|
||||||
emptyScope = makeScope lib.callPackageWith (_: { });
|
emptyScope = makeScope lib.callPackageWith (_: { });
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,16 +3,10 @@ let
|
|||||||
inherit (lib)
|
inherit (lib)
|
||||||
types
|
types
|
||||||
mkOption
|
mkOption
|
||||||
setDefaultModuleLocation
|
|
||||||
evalModules
|
evalModules
|
||||||
;
|
;
|
||||||
inherit (types)
|
inherit (types)
|
||||||
deferredModule
|
deferredModule
|
||||||
lazyAttrsOf
|
|
||||||
submodule
|
|
||||||
str
|
|
||||||
raw
|
|
||||||
enum
|
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) types mkOption setDefaultModuleLocation;
|
inherit (lib) types mkOption;
|
||||||
inherit (types)
|
inherit (types)
|
||||||
deferredModule
|
deferredModule
|
||||||
lazyAttrsOf
|
lazyAttrsOf
|
||||||
submodule
|
submodule
|
||||||
str
|
str
|
||||||
raw
|
|
||||||
enum
|
enum
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -1,15 +1,4 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
let
|
|
||||||
inherit (lib) mkOption types;
|
|
||||||
|
|
||||||
moduleWithKey =
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
config = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./declare-enable.nix
|
./declare-enable.nix
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkOption types;
|
||||||
forceDeep = x: builtins.deepSeq x x;
|
|
||||||
mergedSubOption = (options.merged.type.getSubOptions options.merged.loc).extensible;
|
mergedSubOption = (options.merged.type.getSubOptions options.merged.loc).extensible;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user