remove top level nix inherits

This commit is contained in:
Jeff Hykin 2024-05-26 10:20:23 -04:00
parent 63c79d1b48
commit 7916f50847

View file

@ -58,98 +58,402 @@ in
platforms = self.systems.doubles; # back-compat aliases # TODO: these are not the same as system.platform, we should probably try and unify them platforms = self.systems.doubles; # back-compat aliases # TODO: these are not the same as system.platform, we should probably try and unify them
inherit (builtins) add addErrorContext attrNames concatLists # builtin aliases
deepSeq elem elemAt filter genericClosure genList getAttr add = builtins.add;
hasAttr head isAttrs isBool isInt isList isPath isString length addErrorContext = builtins.addErrorContext;
lessThan listToAttrs pathExists readFile replaceStrings seq attrNames = builtins.attrNames;
stringLength sub substring tail trace; concatLists = builtins.concatLists;
inherit (self.trivial) id const pipe concat or and xor bitAnd bitOr bitXor deepSeq = builtins.deepSeq;
bitNot boolToString mergeAttrs flip mapNullable inNixShell isFloat min max elem = builtins.elem;
importJSON importTOML warn warnIf warnIfNot throwIf throwIfNot checkListOfEnum elemAt = builtins.elemAt;
info showWarnings nixpkgsVersion version isInOldestRelease filter = builtins.filter;
mod compare splitByAndCompare genericClosure = builtins.genericClosure;
functionArgs setFunctionArgs isFunction toFunction mirrorFunctionArgs genList = builtins.genList;
toHexString toBaseDigits inPureEvalMode; getAttr = builtins.getAttr;
inherit (self.fixedPoints) fix fix' converge extends composeExtensions hasAttr = builtins.hasAttr;
composeManyExtensions makeExtensible makeExtensibleWithCustomName; head = builtins.head;
inherit (self.attrsets) attrByPath hasAttrByPath setAttrByPath isAttrs = builtins.isAttrs;
getAttrFromPath attrVals attrValues getAttrs catAttrs filterAttrs isBool = builtins.isBool;
filterAttrsRecursive foldlAttrs foldAttrs collect nameValuePair mapAttrs isInt = builtins.isInt;
mapAttrs' mapAttrsToList attrsToList concatMapAttrs mapAttrsRecursive isList = builtins.isList;
mapAttrsRecursiveCond genAttrs isDerivation toDerivation optionalAttrs isPath = builtins.isPath;
zipAttrsWithNames zipAttrsWith zipAttrs recursiveUpdateUntil isString = builtins.isString;
recursiveUpdate matchAttrs mergeAttrsList overrideExisting showAttrPath getOutput length = builtins.length;
getBin getLib getDev getMan chooseDevOutputs zipWithNames zip lessThan = builtins.lessThan;
recurseIntoAttrs dontRecurseIntoAttrs cartesianProduct cartesianProductOfSets listToAttrs = builtins.listToAttrs;
mapCartesianProduct updateManyAttrsByPath; pathExists = builtins.pathExists;
inherit (self.lists) singleton forEach foldr fold foldl foldl' imap0 imap1 readFile = builtins.readFile;
ifilter0 concatMap flatten remove findSingle findFirst any all count replaceStrings = builtins.replaceStrings;
optional optionals toList range replicate partition zipListsWith zipLists seq = builtins.seq;
reverseList listDfs toposort sort sortOn naturalSort compareLists take stringLength = builtins.stringLength;
drop sublist last init crossLists unique allUnique intersectLists sub = builtins.sub;
subtractLists mutuallyExclusive groupBy groupBy'; substring = builtins.substring;
inherit (self.strings) concatStrings concatMapStrings concatImapStrings tail = builtins.tail;
intersperse concatStringsSep concatMapStringsSep trace = builtins.trace;
concatImapStringsSep concatLines makeSearchPath makeSearchPathOutput
makeLibraryPath makeIncludePath makeBinPath optionalString # trivial to top level
hasInfix hasPrefix hasSuffix stringToCharacters stringAsChars escape id = self.trivial.id;
escapeShellArg escapeShellArgs const = self.trivial.const;
isStorePath isStringLike pipe = self.trivial.pipe;
isValidPosixName toShellVar toShellVars concat = self.trivial.concat;
escapeRegex escapeURL escapeXML replaceChars lowerChars or = self.trivial.or;
upperChars toLower toUpper addContextFrom splitString and = self.trivial.and;
removePrefix removeSuffix versionOlder versionAtLeast xor = self.trivial.xor;
getName getVersion bitAnd = self.trivial.bitAnd;
cmakeOptionType cmakeBool cmakeFeature bitOr = self.trivial.bitOr;
mesonOption mesonBool mesonEnable bitXor = self.trivial.bitXor;
nameFromURL enableFeature enableFeatureAs withFeature bitNot = self.trivial.bitNot;
withFeatureAs fixedWidthString fixedWidthNumber boolToString = self.trivial.boolToString;
toInt toIntBase10 readPathsFromFile fileContents; mergeAttrs = self.trivial.mergeAttrs;
inherit (self.stringsWithDeps) textClosureList textClosureMap flip = self.trivial.flip;
noDepEntry fullDepEntry packEntry stringAfter; mapNullable = self.trivial.mapNullable;
inherit (self.customisation) overrideDerivation makeOverridable inNixShell = self.trivial.inNixShell;
callPackageWith callPackagesWith extendDerivation hydraJob isFloat = self.trivial.isFloat;
makeScope makeScopeWithSplicing makeScopeWithSplicing'; min = self.trivial.min;
inherit (self.derivations) lazyDerivation optionalDrvAttr; max = self.trivial.max;
inherit (self.meta) addMetaAttrs dontDistribute setName updateName importJSON = self.trivial.importJSON;
appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio importTOML = self.trivial.importTOML;
hiPrioSet getLicenseFromSpdxId getExe getExe'; warn = self.trivial.warn;
inherit (self.filesystem) pathType pathIsDirectory pathIsRegularFile warnIf = self.trivial.warnIf;
packagesFromDirectoryRecursive; warnIfNot = self.trivial.warnIfNot;
inherit (self.sources) cleanSourceFilter throwIf = self.trivial.throwIf;
cleanSource sourceByRegex sourceFilesBySuffices throwIfNot = self.trivial.throwIfNot;
commitIdFromGitRepo cleanSourceWith pathHasContext checkListOfEnum = self.trivial.checkListOfEnum;
canCleanSource pathIsGitRepo; info = self.trivial.info;
inherit (self.modules) evalModules setDefaultModuleLocation showWarnings = self.trivial.showWarnings;
unifyModuleSyntax applyModuleArgsIfFunction mergeModules nixpkgsVersion = self.trivial.nixpkgsVersion;
mergeModules' mergeOptionDecls mergeDefinitions version = self.trivial.version;
pushDownProperties dischargeProperties filterOverrides isInOldestRelease = self.trivial.isInOldestRelease;
sortProperties fixupOptionType mkIf mkAssert mkMerge mkOverride mod = self.trivial.mod;
mkOptionDefault mkDefault mkImageMediaOverride mkForce mkVMOverride compare = self.trivial.compare;
mkFixStrictness mkOrder mkBefore mkAfter mkAliasDefinitions splitByAndCompare = self.trivial.splitByAndCompare;
mkAliasAndWrapDefinitions fixMergeModules mkRemovedOptionModule functionArgs = self.trivial.functionArgs;
mkRenamedOptionModule mkRenamedOptionModuleWith setFunctionArgs = self.trivial.setFunctionArgs;
mkMergedOptionModule mkChangedOptionModule isFunction = self.trivial.isFunction;
mkAliasOptionModule mkDerivedConfig doRename toFunction = self.trivial.toFunction;
mkAliasOptionModuleMD; mirrorFunctionArgs = self.trivial.mirrorFunctionArgs;
inherit (self.options) isOption mkEnableOption mkSinkUndeclaredOptions toHexString = self.trivial.toHexString;
mergeDefaultOption mergeOneOption mergeEqualOption mergeUniqueOption toBaseDigits = self.trivial.toBaseDigits;
getValues getFiles inPureEvalMode = self.trivial.inPureEvalMode;
optionAttrSetToDocList optionAttrSetToDocList'
scrubOptionValue literalExpression literalExample # fixed points to top level
showOption showOptionWithDefLocs showFiles fix = self.fixedPoints.fix;
unknownModule mkOption mkPackageOption mkPackageOptionMD fix' = self.fixedPoints.fix';
mdDoc literalMD; converge = self.fixedPoints.converge;
inherit (self.types) isType setType defaultTypeMerge defaultFunctor extends = self.fixedPoints.extends;
isOptionType mkOptionType; composeExtensions = self.fixedPoints.composeExtensions;
inherit (self.asserts) composeManyExtensions = self.fixedPoints.composeManyExtensions;
assertMsg assertOneOf; makeExtensible = self.fixedPoints.makeExtensible;
inherit (self.debug) traceIf traceVal traceValFn makeExtensibleWithCustomName = self.fixedPoints.makeExtensibleWithCustomName;
traceSeq traceSeqN traceValSeq
traceValSeqFn traceValSeqN traceValSeqNFn traceFnSeqN # attrsets to top level
runTests testAllTrue; attrByPath = self.attrsets.attrByPath;
inherit (self.versions) hasAttrByPath = self.attrsets.hasAttrByPath;
splitVersion; setAttrByPath = self.attrsets.setAttrByPath;
getAttrFromPath = self.attrsets.getAttrFromPath;
attrVals = self.attrsets.attrVals;
attrValues = self.attrsets.attrValues;
getAttrs = self.attrsets.getAttrs;
catAttrs = self.attrsets.catAttrs;
filterAttrs = self.attrsets.filterAttrs;
filterAttrsRecursive = self.attrsets.filterAttrsRecursive;
foldlAttrs = self.attrsets.foldlAttrs;
foldAttrs = self.attrsets.foldAttrs;
collect = self.attrsets.collect;
nameValuePair = self.attrsets.nameValuePair;
mapAttrs = self.attrsets.mapAttrs;
mapAttrs' = self.attrsets.mapAttrs';
mapAttrsToList = self.attrsets.mapAttrsToList;
attrsToList = self.attrsets.attrsToList;
concatMapAttrs = self.attrsets.concatMapAttrs;
mapAttrsRecursive = self.attrsets.mapAttrsRecursive;
mapAttrsRecursiveCond = self.attrsets.mapAttrsRecursiveCond;
genAttrs = self.attrsets.genAttrs;
isDerivation = self.attrsets.isDerivation;
toDerivation = self.attrsets.toDerivation;
optionalAttrs = self.attrsets.optionalAttrs;
zipAttrsWithNames = self.attrsets.zipAttrsWithNames;
zipAttrsWith = self.attrsets.zipAttrsWith;
zipAttrs = self.attrsets.zipAttrs;
recursiveUpdateUntil = self.attrsets.recursiveUpdateUntil;
recursiveUpdate = self.attrsets.recursiveUpdate;
matchAttrs = self.attrsets.matchAttrs;
mergeAttrsList = self.attrsets.mergeAttrsList;
overrideExisting = self.attrsets.overrideExisting;
showAttrPath = self.attrsets.showAttrPath;
getOutput = self.attrsets.getOutput;
getBin = self.attrsets.getBin;
getLib = self.attrsets.getLib;
getDev = self.attrsets.getDev;
getMan = self.attrsets.getMan;
chooseDevOutputs = self.attrsets.chooseDevOutputs;
zipWithNames = self.attrsets.zipWithNames;
zip = self.attrsets.zip;
recurseIntoAttrs = self.attrsets.recurseIntoAttrs;
dontRecurseIntoAttrs = self.attrsets.dontRecurseIntoAttrs;
cartesianProduct = self.attrsets.cartesianProduct;
cartesianProductOfSets = self.attrsets.cartesianProductOfSets;
mapCartesianProduct = self.attrsets.mapCartesianProduct;
updateManyAttrsByPath = self.attrsets.updateManyAttrsByPath;
# lists to top level
singleton = self.lists.singleton;
forEach = self.lists.forEach;
foldr = self.lists.foldr;
fold = self.lists.fold;
foldl = self.lists.foldl;
foldl' = self.lists.foldl';
imap0 = self.lists.imap0;
imap1 = self.lists.imap1;
ifilter0 = self.lists.ifilter0;
concatMap = self.lists.concatMap;
flatten = self.lists.flatten;
remove = self.lists.remove;
findSingle = self.lists.findSingle;
findFirst = self.lists.findFirst;
any = self.lists.any;
all = self.lists.all;
count = self.lists.count;
optional = self.lists.optional;
optionals = self.lists.optionals;
toList = self.lists.toList;
range = self.lists.range;
replicate = self.lists.replicate;
partition = self.lists.partition;
zipListsWith = self.lists.zipListsWith;
zipLists = self.lists.zipLists;
reverseList = self.lists.reverseList;
listDfs = self.lists.listDfs;
toposort = self.lists.toposort;
sort = self.lists.sort;
sortOn = self.lists.sortOn;
naturalSort = self.lists.naturalSort;
compareLists = self.lists.compareLists;
take = self.lists.take;
drop = self.lists.drop;
sublist = self.lists.sublist;
last = self.lists.last;
init = self.lists.init;
crossLists = self.lists.crossLists;
unique = self.lists.unique;
allUnique = self.lists.allUnique;
intersectLists = self.lists.intersectLists;
subtractLists = self.lists.subtractLists;
mutuallyExclusive = self.lists.mutuallyExclusive;
groupBy = self.lists.groupBy;
groupBy' = self.lists.groupBy';
# strings to top level
concatStrings = self.strings.concatStrings;
concatMapStrings = self.strings.concatMapStrings;
concatImapStrings = self.strings.concatImapStrings;
intersperse = self.strings.intersperse;
concatStringsSep = self.strings.concatStringsSep;
concatMapStringsSep = self.strings.concatMapStringsSep;
concatImapStringsSep = self.strings.concatImapStringsSep;
concatLines = self.strings.concatLines;
makeSearchPath = self.strings.makeSearchPath;
makeSearchPathOutput = self.strings.makeSearchPathOutput;
makeLibraryPath = self.strings.makeLibraryPath;
makeIncludePath = self.strings.makeIncludePath;
makeBinPath = self.strings.makeBinPath;
optionalString = self.strings.optionalString;
hasInfix = self.strings.hasInfix;
hasPrefix = self.strings.hasPrefix;
hasSuffix = self.strings.hasSuffix;
stringToCharacters = self.strings.stringToCharacters;
stringAsChars = self.strings.stringAsChars;
escape = self.strings.escape;
escapeShellArg = self.strings.escapeShellArg;
escapeShellArgs = self.strings.escapeShellArgs;
isStorePath = self.strings.isStorePath;
isStringLike = self.strings.isStringLike;
isValidPosixName = self.strings.isValidPosixName;
toShellVar = self.strings.toShellVar;
toShellVars = self.strings.toShellVars;
escapeRegex = self.strings.escapeRegex;
escapeURL = self.strings.escapeURL;
escapeXML = self.strings.escapeXML;
replaceChars = self.strings.replaceChars;
lowerChars = self.strings.lowerChars;
upperChars = self.strings.upperChars;
toLower = self.strings.toLower;
toUpper = self.strings.toUpper;
addContextFrom = self.strings.addContextFrom;
splitString = self.strings.splitString;
removePrefix = self.strings.removePrefix;
removeSuffix = self.strings.removeSuffix;
versionOlder = self.strings.versionOlder;
versionAtLeast = self.strings.versionAtLeast;
getName = self.strings.getName;
getVersion = self.strings.getVersion;
cmakeOptionType = self.strings.cmakeOptionType;
cmakeBool = self.strings.cmakeBool;
cmakeFeature = self.strings.cmakeFeature;
mesonOption = self.strings.mesonOption;
mesonBool = self.strings.mesonBool;
mesonEnable = self.strings.mesonEnable;
nameFromURL = self.strings.nameFromURL;
enableFeature = self.strings.enableFeature;
enableFeatureAs = self.strings.enableFeatureAs;
withFeature = self.strings.withFeature;
withFeatureAs = self.strings.withFeatureAs;
fixedWidthString = self.strings.fixedWidthString;
fixedWidthNumber = self.strings.fixedWidthNumber;
toInt = self.strings.toInt;
toIntBase10 = self.strings.toIntBase10;
readPathsFromFile = self.strings.readPathsFromFile;
fileContents = self.strings.fileContents;
# stringsWithDeps to top level
textClosureList = self.stringsWithDeps.textClosureList;
textClosureMap = self.stringsWithDeps.textClosureMap;
noDepEntry = self.stringsWithDeps.noDepEntry;
fullDepEntry = self.stringsWithDeps.fullDepEntry;
packEntry = self.stringsWithDeps.packEntry;
stringAfter = self.stringsWithDeps.stringAfter;
# customisation to top level
overrideDerivation = self.customisation.overrideDerivation;
makeOverridable = self.customisation.makeOverridable;
callPackageWith = self.customisation.callPackageWith;
callPackagesWith = self.customisation.callPackagesWith;
extendDerivation = self.customisation.extendDerivation;
hydraJob = self.customisation.hydraJob;
makeScope = self.customisation.makeScope;
makeScopeWithSplicing = self.customisation.makeScopeWithSplicing;
makeScopeWithSplicing' = self.customisation.makeScopeWithSplicing';
# derivations to top level
lazyDerivation = self.derivations.lazyDerivation;
optionalDrvAttr = self.derivations.optionalDrvAttr;
# meta to top level
addMetaAttrs = self.meta.addMetaAttrs;
dontDistribute = self.meta.dontDistribute;
setName = self.meta.setName;
updateName = self.meta.updateName;
appendToName = self.meta.appendToName;
mapDerivationAttrset = self.meta.mapDerivationAttrset;
setPrio = self.meta.setPrio;
lowPrio = self.meta.lowPrio;
lowPrioSet = self.meta.lowPrioSet;
hiPrio = self.meta.hiPrio;
hiPrioSet = self.meta.hiPrioSet;
getLicenseFromSpdxId = self.meta.getLicenseFromSpdxId;
getExe = self.meta.getExe;
getExe' = self.meta.getExe';
# filesystem to top level
pathType = self.filesystem.pathType;
pathIsDirectory = self.filesystem.pathIsDirectory;
pathIsRegularFile = self.filesystem.pathIsRegularFile;
packagesFromDirectoryRecursive = self.filesystem.packagesFromDirectoryRecursive;
# sources to top level
cleanSourceFilter = self.sources.cleanSourceFilter;
cleanSource = self.sources.cleanSource;
sourceByRegex = self.sources.sourceByRegex;
sourceFilesBySuffices = self.sources.sourceFilesBySuffices;
commitIdFromGitRepo = self.sources.commitIdFromGitRepo;
cleanSourceWith = self.sources.cleanSourceWith;
pathHasContext = self.sources.pathHasContext;
canCleanSource = self.sources.canCleanSource;
pathIsGitRepo = self.sources.pathIsGitRepo;
# modules to top level
evalModules = self.modules.evalModules;
setDefaultModuleLocation = self.modules.setDefaultModuleLocation;
unifyModuleSyntax = self.modules.unifyModuleSyntax;
applyModuleArgsIfFunction = self.modules.applyModuleArgsIfFunction;
mergeModules = self.modules.mergeModules;
mergeModules' = self.modules.mergeModules';
mergeOptionDecls = self.modules.mergeOptionDecls;
mergeDefinitions = self.modules.mergeDefinitions;
pushDownProperties = self.modules.pushDownProperties;
dischargeProperties = self.modules.dischargeProperties;
filterOverrides = self.modules.filterOverrides;
sortProperties = self.modules.sortProperties;
fixupOptionType = self.modules.fixupOptionType;
mkIf = self.modules.mkIf;
mkAssert = self.modules.mkAssert;
mkMerge = self.modules.mkMerge;
mkOverride = self.modules.mkOverride;
mkOptionDefault = self.modules.mkOptionDefault;
mkDefault = self.modules.mkDefault;
mkImageMediaOverride = self.modules.mkImageMediaOverride;
mkForce = self.modules.mkForce;
mkVMOverride = self.modules.mkVMOverride;
mkFixStrictness = self.modules.mkFixStrictness;
mkOrder = self.modules.mkOrder;
mkBefore = self.modules.mkBefore;
mkAfter = self.modules.mkAfter;
mkAliasDefinitions = self.modules.mkAliasDefinitions;
mkAliasAndWrapDefinitions = self.modules.mkAliasAndWrapDefinitions;
fixMergeModules = self.modules.fixMergeModules;
mkRemovedOptionModule = self.modules.mkRemovedOptionModule;
mkRenamedOptionModule = self.modules.mkRenamedOptionModule;
mkRenamedOptionModuleWith = self.modules.mkRenamedOptionModuleWith;
mkMergedOptionModule = self.modules.mkMergedOptionModule;
mkChangedOptionModule = self.modules.mkChangedOptionModule;
mkAliasOptionModule = self.modules.mkAliasOptionModule;
mkDerivedConfig = self.modules.mkDerivedConfig;
doRename = self.modules.doRename;
mkAliasOptionModuleMD = self.modules.mkAliasOptionModuleMD;
# options to top level
isOption = self.options.isOption;
mkEnableOption = self.options.mkEnableOption;
mkSinkUndeclaredOptions = self.options.mkSinkUndeclaredOptions;
mergeDefaultOption = self.options.mergeDefaultOption;
mergeOneOption = self.options.mergeOneOption;
mergeEqualOption = self.options.mergeEqualOption;
mergeUniqueOption = self.options.mergeUniqueOption;
getValues = self.options.getValues;
getFiles = self.options.getFiles;
optionAttrSetToDocList = self.options.optionAttrSetToDocList;
optionAttrSetToDocList' = self.options.optionAttrSetToDocList';
scrubOptionValue = self.options.scrubOptionValue;
literalExpression = self.options.literalExpression;
literalExample = self.options.literalExample;
showOption = self.options.showOption;
showOptionWithDefLocs = self.options.showOptionWithDefLocs;
showFiles = self.options.showFiles;
unknownModule = self.options.unknownModule;
mkOption = self.options.mkOption;
mkPackageOption = self.options.mkPackageOption;
mkPackageOptionMD = self.options.mkPackageOptionMD;
mdDoc = self.options.mdDoc;
literalMD = self.options.literalMD;
# types to top level
isType = self.types.isType;
setType = self.types.setType;
defaultTypeMerge = self.types.defaultTypeMerge;
defaultFunctor = self.types.defaultFunctor;
isOptionType = self.types.isOptionType;
mkOptionType = self.types.mkOptionType;
# asserts to top level
assertMsg = self.asserts.assertMsg;
assertOneOf = self.asserts.assertOneOf;
# debug to top level
traceIf = self.debug.traceIf;
traceVal = self.debug.traceVal;
traceValFn = self.debug.traceValFn;
traceSeq = self.debug.traceSeq;
traceSeqN = self.debug.traceSeqN;
traceValSeq = self.debug.traceValSeq;
traceValSeqFn = self.debug.traceValSeqFn;
traceValSeqN = self.debug.traceValSeqN;
traceValSeqNFn = self.debug.traceValSeqNFn;
traceFnSeqN = self.debug.traceFnSeqN;
runTests = self.debug.runTests;
testAllTrue = self.debug.testAllTrue;
# versions to top level
splitVersion = self.versions.splitVersion;
} }
); );
in lib in lib