Skip to content

Commit

Permalink
Merge #150
Browse files Browse the repository at this point in the history
150: switch to go-modules.outputHash r=figsoda a=zowoq



Co-authored-by: zowoq <[email protected]>
  • Loading branch information
bors[bot] and zowoq authored Apr 10, 2023
2 parents 329edce + 0ccd9cc commit 71e0c96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 2 additions & 4 deletions nix_update/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class Package:
changelog: Optional[str]
rev: str
hash: Optional[str]
vendor_hash: Optional[str]
vendor_sha256: Optional[str]
go_modules: Optional[str]
cargo_deps: Optional[str]
npm_deps: Optional[str]
tests: List[str]
Expand Down Expand Up @@ -141,8 +140,7 @@ def eval_expression(
url = pkg.src.url or null;
rev = pkg.src.rev or null;
hash = pkg.src.outputHash or null;
vendor_hash = pkg.vendorHash or null;
vendor_sha256 = pkg.vendorSha256 or null;
go_modules = pkg.go-modules.outputHash or null;
cargo_deps = pkg.cargoDeps.outputHash or null;
raw_cargo_lock =
if pkg ? cargoDeps.lockFile then
Expand Down
7 changes: 2 additions & 5 deletions nix_update/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,8 @@ def update(opts: Options) -> Package:

# if no package.hash was provided we just update the other hashes unconditionally
if update_hash or not package.hash:
if package.vendor_hash and package.vendor_sha256 == "_unset":
update_go_modules_hash(opts, package.filename, package.vendor_hash)

if package.vendor_sha256 and package.vendor_hash == "_unset":
update_go_modules_hash(opts, package.filename, package.vendor_sha256)
if package.go_modules:
update_go_modules_hash(opts, package.filename, package.go_modules)

if package.cargo_deps:
update_cargo_deps_hash(opts, package.filename, package.cargo_deps)
Expand Down

0 comments on commit 71e0c96

Please sign in to comment.