summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lib/generators.nix6
-rw-r--r--lib/modules.nix10
-rw-r--r--lib/options.nix1
-rw-r--r--lib/sources.nix1
-rw-r--r--lib/tests/maintainers.nix1
-rw-r--r--lib/types.nix2
-rw-r--r--nixos/lib/make-multi-disk-zfs-image.nix7
-rw-r--r--nixos/lib/make-single-disk-zfs-image.nix9
-rw-r--r--pkgs/build-support/rust/build-rust-package/default.nix4
-rw-r--r--pkgs/build-support/src-only/default.nix2
-rw-r--r--pkgs/tools/misc/elfcat/Cargo.lock7
-rw-r--r--pkgs/top-level/octave-packages.nix7
12 files changed, 5 insertions, 52 deletions
diff --git a/lib/generators.nix b/lib/generators.nix
index 431b93c4ebbc6..28b2e39bf6464 100644
--- a/lib/generators.nix
+++ b/lib/generators.nix
@@ -240,10 +240,10 @@ rec {
     * to implicit typing rules, so it should work with older
     * parsers as well.
     */
-  toYAML = {}@args: toJSON args;
+  toYAML = toJSON;
 
   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";
diff --git a/lib/modules.nix b/lib/modules.nix
index 46e22088a204a..a7fbec93a2f51 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:
@@ -604,7 +601,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 "<no description>"}' does not support nested options.\n${
@@ -652,11 +648,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;
diff --git a/lib/options.nix b/lib/options.nix
index dea85f0db04cb..40c1af667619f 100644
--- a/lib/options.nix
+++ b/lib/options.nix
@@ -8,7 +8,6 @@ let
     concatLists
     concatMap
     concatMapStringsSep
-    elemAt
     filter
     foldl'
     head
diff --git a/lib/sources.nix b/lib/sources.nix
index 343449d9a6037..cec395c9bb180 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
diff --git a/lib/tests/maintainers.nix b/lib/tests/maintainers.nix
index 935d256d218d2..8a9a2b26efaf7 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 ];
diff --git a/lib/types.nix b/lib/types.nix
index ed1d5f44064fe..9b2c5e846ad15 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
     ;
diff --git a/nixos/lib/make-multi-disk-zfs-image.nix b/nixos/lib/make-multi-disk-zfs-image.nix
index 0a894c8b9888f..f9046a485a7dd 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;
diff --git a/nixos/lib/make-single-disk-zfs-image.nix b/nixos/lib/make-single-disk-zfs-image.nix
index 98150584fb3e4..ef3b1c0e2842d 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;
diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix
index db0d2c53bb1e8..84700ff29af09 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;
diff --git a/pkgs/build-support/src-only/default.nix b/pkgs/build-support/src-only/default.nix
index b4e373cd058e6..520753e37460c 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.
diff --git a/pkgs/tools/misc/elfcat/Cargo.lock b/pkgs/tools/misc/elfcat/Cargo.lock
deleted file mode 100644
index b6e39fd5edce1..0000000000000
--- 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"
diff --git a/pkgs/top-level/octave-packages.nix b/pkgs/top-level/octave-packages.nix
index 3895d7871f91e..374163fa56732 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