From dc19b95eff6b56f8dfc4abd75e035d27dd0c1f40 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 21:53:37 -0400 Subject: [PATCH 01/13] rustPlatform.buildRustPackage: remove unused function --- pkgs/build-support/rust/build-rust-package/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix index db0d2c53bb1e..84700ff29af0 100644 --- a/pkgs/build-support/rust/build-rust-package/default.nix +++ b/pkgs/build-support/rust/build-rust-package/default.nix @@ -72,10 +72,6 @@ let sha256 = args.cargoSha256; } // depsExtraArgs); - # If we have a cargoSha256 fixed-output derivation, validate it at build time - # against the src fixed-output derivation to check consistency. - validateCargoDeps = args ? cargoHash || args ? cargoSha256; - target = rust.toRustTargetSpec stdenv.hostPlatform; targetIsJSON = lib.hasSuffix ".json" target; useSysroot = targetIsJSON && !__internal_dontAddSysroot; From 1c029633ef6557e569865da0477e13dce9263971 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 21:54:07 -0400 Subject: [PATCH 02/13] elfcat: remove orphan file --- pkgs/tools/misc/elfcat/Cargo.lock | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 pkgs/tools/misc/elfcat/Cargo.lock diff --git a/pkgs/tools/misc/elfcat/Cargo.lock b/pkgs/tools/misc/elfcat/Cargo.lock deleted file mode 100644 index b6e39fd5edce..000000000000 --- a/pkgs/tools/misc/elfcat/Cargo.lock +++ /dev/null @@ -1,7 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "elfcat" -version = "0.1.8" From 048e15d70d0332f86f8422c601a9d2fb186c3db5 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 21:57:06 -0400 Subject: [PATCH 03/13] top-level/octave-packages.nix: remove unused bindings --- pkgs/top-level/octave-packages.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkgs/top-level/octave-packages.nix b/pkgs/top-level/octave-packages.nix index 3895d7871f91..374163fa5673 100644 --- a/pkgs/top-level/octave-packages.nix +++ b/pkgs/top-level/octave-packages.nix @@ -23,8 +23,6 @@ with lib; makeScope newScope (self: let - inherit (octave) blas lapack gfortran python texinfo gnuplot; - callPackage = self.callPackage; buildOctavePackage = callPackage ../development/interpreters/octave/build-octave-package.nix { @@ -33,11 +31,6 @@ makeScope newScope (self: inherit computeRequiredOctavePackages; }; - wrapOctave = callPackage ../development/interpreters/octave/wrap-octave.nix { - inherit octave; - inherit (pkgs) makeSetupHook makeWrapper; - }; - # Given a list of required Octave package derivations, get a list of # ALL required Octave packages needed for the ones specified to run. computeRequiredOctavePackages = drvs: let From 07b3a5a0ddb569cf903101db3650c0a645b1426d Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:04:07 -0400 Subject: [PATCH 04/13] lib/generators.nix: remove unused bindings --- lib/generators.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/generators.nix b/lib/generators.nix index 431b93c4ebbc..40e88b563490 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -243,7 +243,7 @@ rec { toYAML = {}@args: toJSON args; withRecursion = - args@{ + { /* If this option is not null, the given value will stop evaluating at a certain depth */ depthLimit /* If this option is true, an error will be thrown, if a certain given depth is exceeded */ @@ -287,7 +287,7 @@ rec { allowPrettyValues ? false, /* If this option is true, the output is indented with newlines for attribute sets and lists */ multiline ? true - }@args: + }: let go = indent: v: with builtins; let isPath = v: typeOf v == "path"; From 05fc3747c9c5c96bd570e078fde5e48cac8ffd3c Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:05:09 -0400 Subject: [PATCH 05/13] lib/modules.nix: remove unused bindings --- lib/modules.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index b6751d17f8f4..c2150da4fd75 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -12,7 +12,6 @@ let concatStringsSep elem filter - findFirst foldl' getAttrFromPath head @@ -34,7 +33,6 @@ let recursiveUpdate reverseList sort setAttrByPath - toList types warnIf zipAttrsWith @@ -46,7 +44,6 @@ let showFiles showOption unknownModule - literalExpression ; showDeclPrefix = loc: decl: prefix: @@ -603,7 +600,6 @@ rec { } else let - firstNonOption = findFirst (m: !isOption m.options) "" decls; nonOptions = filter (m: !isOption m.options) decls; in throw "The option `${showOption loc}' in module `${(lib.head optionDecls)._file}' would be a parent of the following options, but its type `${(lib.head optionDecls).options.type.description or ""}' does not support nested options.\n${ @@ -651,11 +647,7 @@ rec { 'opts' is a list of modules. Each module has an options attribute which correspond to the definition of 'loc' in 'opt.file'. */ mergeOptionDecls = - let - coerceOption = file: opt: - if isFunction opt then setDefaultModuleLocation file opt - else setDefaultModuleLocation file { options = opt; }; - in loc: opts: + loc: opts: foldl' (res: opt: let t = res.type; t' = opt.options.type; From d29b0096d3a0648e747bf6d11daec622879a107b Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:05:45 -0400 Subject: [PATCH 06/13] lib/options.nix: remove unused binding --- lib/options.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index dea85f0db04c..40c1af667619 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -8,7 +8,6 @@ let concatLists concatMap concatMapStringsSep - elemAt filter foldl' head From 53052c4fb0bd2970c5c1c2e23adf62ac8b6eaf04 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:06:08 -0400 Subject: [PATCH 07/13] lib/sources.nix: remove unused binding --- lib/sources.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/sources.nix b/lib/sources.nix index 343449d9a603..cec395c9bb18 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -4,7 +4,6 @@ # Tested in lib/tests/sources.sh let inherit (builtins) - hasContext match readDir split From 4ef185c1b8ee6d4aa81df87e9af282edd99500da Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:07:28 -0400 Subject: [PATCH 08/13] lib/types.nix: remove unused bindings --- lib/types.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index ed1d5f44064f..9b2c5e846ad1 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -6,7 +6,6 @@ let inherit (lib) elem flip - functionArgs isAttrs isBool isDerivation @@ -16,7 +15,6 @@ let isList isString isStorePath - setFunctionArgs toDerivation toList ; From f9f6872960dd9d4476f855d23d51a87beeb6e625 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:07:51 -0400 Subject: [PATCH 09/13] lib/tests/maintainers.nix: remove unused binding --- lib/tests/maintainers.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/tests/maintainers.nix b/lib/tests/maintainers.nix index 935d256d218d..8a9a2b26efaf 100644 --- a/lib/tests/maintainers.nix +++ b/lib/tests/maintainers.nix @@ -6,7 +6,6 @@ }: let - inherit (lib) types; checkMaintainer = handle: uncheckedAttrs: let prefix = [ "lib" "maintainers" handle ]; From dd73077dc3080cb250c84db56bf2b03b85da6bdd Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:14:28 -0400 Subject: [PATCH 10/13] srcOnly: remove unused binding --- pkgs/build-support/src-only/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/src-only/default.nix b/pkgs/build-support/src-only/default.nix index b4e373cd058e..520753e37460 100644 --- a/pkgs/build-support/src-only/default.nix +++ b/pkgs/build-support/src-only/default.nix @@ -1,4 +1,4 @@ -{ stdenv }@orig: +{ stdenv }: # srcOnly is a utility builder that only fetches and unpacks the given `src`, # maybe pathings it in the process with the optional `patches` and # `buildInputs` attributes. From 84bc9ff334a24e307b5e0ad7e177d1d26b2be812 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:17:20 -0400 Subject: [PATCH 11/13] nixos/lib/make-multi-disk-zfs-image.nix: remove unused binding --- nixos/lib/make-multi-disk-zfs-image.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/nixos/lib/make-multi-disk-zfs-image.nix b/nixos/lib/make-multi-disk-zfs-image.nix index 0a894c8b9888..f9046a485a7d 100644 --- a/nixos/lib/make-multi-disk-zfs-image.nix +++ b/nixos/lib/make-multi-disk-zfs-image.nix @@ -143,13 +143,6 @@ let properties ); - featuresToProperties = features: - lib.listToAttrs - (builtins.map (feature: { - name = "feature@${feature}"; - value = "enabled"; - }) features); - createDatasets = let datasetlist = lib.mapAttrsToList lib.nameValuePair datasets; From dc4b44a2f3dc8682d6e56f204a6e782d43388b00 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 22:17:55 -0400 Subject: [PATCH 12/13] nixos/lib/make-single-disk-zfs-image.nix: remove unused binding --- nixos/lib/make-single-disk-zfs-image.nix | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nixos/lib/make-single-disk-zfs-image.nix b/nixos/lib/make-single-disk-zfs-image.nix index 98150584fb3e..ef3b1c0e2842 100644 --- a/nixos/lib/make-single-disk-zfs-image.nix +++ b/nixos/lib/make-single-disk-zfs-image.nix @@ -131,15 +131,6 @@ let properties ); - featuresToProperties = features: - lib.listToAttrs - (builtins.map - (feature: { - name = "feature@${feature}"; - value = "enabled"; - }) - features); - createDatasets = let datasetlist = lib.mapAttrsToList lib.nameValuePair datasets; From 3f0f0c74e9ab7ae45a23c66897d434f07e1b18a2 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 28 Sep 2022 16:34:55 -0400 Subject: [PATCH 13/13] lib.generators: simplify toYAML --- lib/generators.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/generators.nix b/lib/generators.nix index 40e88b563490..28b2e39bf646 100644 --- a/lib/generators.nix +++ b/lib/generators.nix @@ -240,7 +240,7 @@ rec { * to implicit typing rules, so it should work with older * parsers as well. */ - toYAML = {}@args: toJSON args; + toYAML = toJSON; withRecursion = {