Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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