lol

Merge pull request #193132 from figsoda/clean-up

treewide: clean up

authored by

figsoda and committed by
GitHub
a1d50eec cc23141b

+5 -52
+3 -3
lib/generators.nix
··· 240 240 * to implicit typing rules, so it should work with older 241 241 * parsers as well. 242 242 */ 243 - toYAML = {}@args: toJSON args; 243 + toYAML = toJSON; 244 244 245 245 withRecursion = 246 - args@{ 246 + { 247 247 /* If this option is not null, the given value will stop evaluating at a certain depth */ 248 248 depthLimit 249 249 /* If this option is true, an error will be thrown, if a certain given depth is exceeded */ ··· 287 287 allowPrettyValues ? false, 288 288 /* If this option is true, the output is indented with newlines for attribute sets and lists */ 289 289 multiline ? true 290 - }@args: 290 + }: 291 291 let 292 292 go = indent: v: with builtins; 293 293 let isPath = v: typeOf v == "path";
+1 -9
lib/modules.nix
··· 12 12 concatStringsSep 13 13 elem 14 14 filter 15 - findFirst 16 15 foldl' 17 16 getAttrFromPath 18 17 head ··· 34 33 recursiveUpdate 35 34 reverseList sort 36 35 setAttrByPath 37 - toList 38 36 types 39 37 warnIf 40 38 zipAttrsWith ··· 46 44 showFiles 47 45 showOption 48 46 unknownModule 49 - literalExpression 50 47 ; 51 48 52 49 showDeclPrefix = loc: decl: prefix: ··· 604 601 } 605 602 else 606 603 let 607 - firstNonOption = findFirst (m: !isOption m.options) "" decls; 608 604 nonOptions = filter (m: !isOption m.options) decls; 609 605 in 610 606 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 648 'opts' is a list of modules. Each module has an options attribute which 653 649 correspond to the definition of 'loc' in 'opt.file'. */ 654 650 mergeOptionDecls = 655 - let 656 - coerceOption = file: opt: 657 - if isFunction opt then setDefaultModuleLocation file opt 658 - else setDefaultModuleLocation file { options = opt; }; 659 - in loc: opts: 651 + loc: opts: 660 652 foldl' (res: opt: 661 653 let t = res.type; 662 654 t' = opt.options.type;
-1
lib/options.nix
··· 8 8 concatLists 9 9 concatMap 10 10 concatMapStringsSep 11 - elemAt 12 11 filter 13 12 foldl' 14 13 head
-1
lib/sources.nix
··· 4 4 # Tested in lib/tests/sources.sh 5 5 let 6 6 inherit (builtins) 7 - hasContext 8 7 match 9 8 readDir 10 9 split
-1
lib/tests/maintainers.nix
··· 6 6 }: 7 7 8 8 let 9 - inherit (lib) types; 10 9 checkMaintainer = handle: uncheckedAttrs: 11 10 let 12 11 prefix = [ "lib" "maintainers" handle ];
-2
lib/types.nix
··· 6 6 inherit (lib) 7 7 elem 8 8 flip 9 - functionArgs 10 9 isAttrs 11 10 isBool 12 11 isDerivation ··· 16 15 isList 17 16 isString 18 17 isStorePath 19 - setFunctionArgs 20 18 toDerivation 21 19 toList 22 20 ;
-7
nixos/lib/make-multi-disk-zfs-image.nix
··· 143 143 properties 144 144 ); 145 145 146 - featuresToProperties = features: 147 - lib.listToAttrs 148 - (builtins.map (feature: { 149 - name = "feature@${feature}"; 150 - value = "enabled"; 151 - }) features); 152 - 153 146 createDatasets = 154 147 let 155 148 datasetlist = lib.mapAttrsToList lib.nameValuePair datasets;
-9
nixos/lib/make-single-disk-zfs-image.nix
··· 131 131 properties 132 132 ); 133 133 134 - featuresToProperties = features: 135 - lib.listToAttrs 136 - (builtins.map 137 - (feature: { 138 - name = "feature@${feature}"; 139 - value = "enabled"; 140 - }) 141 - features); 142 - 143 134 createDatasets = 144 135 let 145 136 datasetlist = lib.mapAttrsToList lib.nameValuePair datasets;
-4
pkgs/build-support/rust/build-rust-package/default.nix
··· 72 72 sha256 = args.cargoSha256; 73 73 } // depsExtraArgs); 74 74 75 - # If we have a cargoSha256 fixed-output derivation, validate it at build time 76 - # against the src fixed-output derivation to check consistency. 77 - validateCargoDeps = args ? cargoHash || args ? cargoSha256; 78 - 79 75 target = rust.toRustTargetSpec stdenv.hostPlatform; 80 76 targetIsJSON = lib.hasSuffix ".json" target; 81 77 useSysroot = targetIsJSON && !__internal_dontAddSysroot;
+1 -1
pkgs/build-support/src-only/default.nix
··· 1 - { stdenv }@orig: 1 + { stdenv }: 2 2 # srcOnly is a utility builder that only fetches and unpacks the given `src`, 3 3 # maybe pathings it in the process with the optional `patches` and 4 4 # `buildInputs` attributes.
-7
pkgs/tools/misc/elfcat/Cargo.lock
··· 1 - # This file is automatically @generated by Cargo. 2 - # It is not intended for manual editing. 3 - version = 3 4 - 5 - [[package]] 6 - name = "elfcat" 7 - version = "0.1.8"
-7
pkgs/top-level/octave-packages.nix
··· 23 23 24 24 makeScope newScope (self: 25 25 let 26 - inherit (octave) blas lapack gfortran python texinfo gnuplot; 27 - 28 26 callPackage = self.callPackage; 29 27 30 28 buildOctavePackage = callPackage ../development/interpreters/octave/build-octave-package.nix { 31 29 inherit lib stdenv; 32 30 inherit octave; 33 31 inherit computeRequiredOctavePackages; 34 - }; 35 - 36 - wrapOctave = callPackage ../development/interpreters/octave/wrap-octave.nix { 37 - inherit octave; 38 - inherit (pkgs) makeSetupHook makeWrapper; 39 32 }; 40 33 41 34 # Given a list of required Octave package derivations, get a list of