1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

Merge pull request #193132 from figsoda/clean-up

treewide: clean up
This commit is contained in:
figsoda 2022-10-01 17:03:11 -04:00 committed by GitHub
commit a1d50eecab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 5 additions and 52 deletions

View file

@ -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";

View file

@ -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;

View file

@ -8,7 +8,6 @@ let
concatLists
concatMap
concatMapStringsSep
elemAt
filter
foldl'
head

View file

@ -4,7 +4,6 @@
# Tested in lib/tests/sources.sh
let
inherit (builtins)
hasContext
match
readDir
split

View file

@ -6,7 +6,6 @@
}:
let
inherit (lib) types;
checkMaintainer = handle: uncheckedAttrs:
let
prefix = [ "lib" "maintainers" handle ];

View file

@ -6,7 +6,6 @@ let
inherit (lib)
elem
flip
functionArgs
isAttrs
isBool
isDerivation
@ -16,7 +15,6 @@ let
isList
isString
isStorePath
setFunctionArgs
toDerivation
toList
;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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.

View file

@ -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"

View file

@ -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