mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-27 06:37:01 +03:00
rename sourcesCombinedHash -> sourcesAggregatedHash
This commit is contained in:
parent
97e2fef121
commit
e99487cee9
@ -170,9 +170,9 @@ class AddCommand(Command):
|
||||
|
||||
def aggregate_hashes(self, lock, outputDreamLock):
|
||||
print("Building FOD of aggregates sources to retrieve output hash")
|
||||
# remove hashes from lock file and init sourcesCombinedHash with empty string
|
||||
# remove hashes from lock file and init sourcesAggregatedHash with empty string
|
||||
strip_hashes_from_lock(lock)
|
||||
lock['_generic']['sourcesCombinedHash'] = ""
|
||||
lock['_generic']['sourcesAggregatedHash'] = ""
|
||||
with open(outputDreamLock, 'w') as f:
|
||||
json.dump(lock, f, indent=2)
|
||||
# compute FOD hash of aggregated sources
|
||||
@ -195,7 +195,7 @@ class AddCommand(Command):
|
||||
hash = match.groups()[0]
|
||||
print(f"Computed FOD hash: {hash}")
|
||||
# store the hash in the lock
|
||||
lock['_generic']['sourcesCombinedHash'] = hash
|
||||
lock['_generic']['sourcesAggregatedHash'] = hash
|
||||
|
||||
def postprocess_dep_graph(self, lock):
|
||||
depGraph = lock['_generic']['dependencies']
|
||||
|
@ -131,7 +131,7 @@ let
|
||||
|
||||
# detect if granular or combined fetching must be used
|
||||
findFetcher = dreamLock:
|
||||
if null != dreamLock._generic.sourcesCombinedHash then
|
||||
if null != dreamLock._generic.sourcesAggregatedHash then
|
||||
fetchers.combinedFetcher
|
||||
else
|
||||
fetchers.defaultFetcher;
|
||||
@ -157,7 +157,7 @@ let
|
||||
mainPackageName = dreamLock._generic.mainPackageName;
|
||||
mainPackageVersion = dreamLock._generic.mainPackageVersion;
|
||||
sources = dreamLock'.sources;
|
||||
sourcesCombinedHash = dreamLock'._generic.sourcesCombinedHash;
|
||||
sourcesAggregatedHash = dreamLock'._generic.sourcesAggregatedHash;
|
||||
};
|
||||
|
||||
fetchedSources = fetched.fetchedSources;
|
||||
|
@ -18,7 +18,7 @@
|
||||
{
|
||||
# sources attrset from dream lock
|
||||
sources,
|
||||
sourcesCombinedHash,
|
||||
sourcesAggregatedHash,
|
||||
...
|
||||
}@args:
|
||||
let
|
||||
@ -168,7 +168,7 @@ let
|
||||
];
|
||||
outputHashAlgo = "sha256";
|
||||
outputHashMode = "recursive";
|
||||
outputHash = sourcesCombinedHash;
|
||||
outputHash = sourcesAggregatedHash;
|
||||
};
|
||||
|
||||
in
|
||||
|
@ -62,7 +62,7 @@ def main():
|
||||
"mainPackageName": os.environ.get('NAME'),
|
||||
"mainPackageVersion": os.environ.get('VERSION'),
|
||||
|
||||
"sourcesCombinedHash": None,
|
||||
"sourcesAggregatedHash": None,
|
||||
},
|
||||
_subsystem={
|
||||
"application": jsonInput['application'],
|
||||
|
@ -32,7 +32,7 @@ let
|
||||
mainPackageSource ? { type = "unknown"; },
|
||||
}:
|
||||
let
|
||||
|
||||
|
||||
serializedPackagesList = serializePackages inputData;
|
||||
|
||||
allDependencies = b.foldl'
|
||||
@ -57,7 +57,7 @@ let
|
||||
"${getVersion pkgData}" =
|
||||
let
|
||||
type = getSourceType pkgData;
|
||||
constructedArgs =
|
||||
constructedArgs =
|
||||
(sourceConstructors."${type}" pkgData)
|
||||
// { inherit type; };
|
||||
in
|
||||
@ -69,7 +69,7 @@ let
|
||||
|
||||
dependencyGraph =
|
||||
let
|
||||
depGraph =
|
||||
depGraph =
|
||||
(lib.mapAttrs
|
||||
(name: versions:
|
||||
lib.mapAttrs
|
||||
@ -89,7 +89,7 @@ let
|
||||
|
||||
allDependencyKeys =
|
||||
let
|
||||
depsWithDuplicates =
|
||||
depsWithDuplicates =
|
||||
lib.flatten
|
||||
(lib.flatten
|
||||
(lib.mapAttrsToList
|
||||
@ -97,7 +97,7 @@ let
|
||||
dependencyGraph));
|
||||
in
|
||||
lib.unique depsWithDuplicates;
|
||||
|
||||
|
||||
missingDependencies =
|
||||
lib.flatten
|
||||
(lib.forEach allDependencyKeys
|
||||
@ -123,7 +123,7 @@ let
|
||||
|
||||
allSources =
|
||||
lib.recursiveUpdate sources generatedSources;
|
||||
|
||||
|
||||
getDepByNameVer = name: version:
|
||||
allDependencies."${name}"."${version}";
|
||||
|
||||
@ -208,10 +208,10 @@ let
|
||||
mainPackageVersion
|
||||
;
|
||||
subsystem = subsystemName;
|
||||
sourcesCombinedHash = null;
|
||||
sourcesAggregatedHash = null;
|
||||
translator = translatorName;
|
||||
};
|
||||
|
||||
|
||||
# build system specific attributes
|
||||
_subsystem = subsystemAttrs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user